conv

Trait ValueInto

Source
pub trait ValueInto<Dst> {
    type Err: Error;

    // Required method
    fn value_into(self) -> Result<Dst, Self::Err>;
}
Expand description

This is the dual of ValueFrom; see that trait for information.

Where possible, prefer using this trait over ValueFrom for generic constraints, but prefer implementing ValueFrom.

Required Associated Types§

Source

type Err: Error

The error type produced by a failed conversion.

Required Methods§

Source

fn value_into(self) -> Result<Dst, Self::Err>

Convert the subject into an exactly equivalent representation.

Implementors§

Source§

impl<Src, Dst> ValueInto<Dst> for Src
where Dst: ValueFrom<Src>,

Source§

type Err = <Dst as ValueFrom<Src>>::Err