[−][src]Trait conv::ValueFrom
This trait is used to perform an exact, value-preserving conversion.
Where possible, prefer implementing this trait over ValueInto
, but prefer using ValueInto
for generic constraints.
Details
Implementations of this trait should be reflexive, associative and commutative (in the absence of conversion errors). That is, all possible cycles of ValueFrom
conversions (for which each "step" has a defined implementation) should produce the same result, with a given value either being "round-tripped" exactly, or an error being produced.
Associated Types
Loading content...Required methods
fn value_from(src: Src) -> Result<Self, Self::Err>
Convert the given value into an exactly equivalent representation.