Tries to extract a value of type A
from an unknown input value.
Tries to extract a value of type A
from an unknown input value.
If the input value is generally incompatible with A
, an efficient
return value is Unsupported
.
The extraction should be direct and lossless. For example, a FromAny[Int]
should not try to parse a string, nor should it case a Long
to an Int
.
On the other hand, a FromAny[Double]
should accept a Float
as input.