conv

Trait ApproxInto

Source
pub trait ApproxInto<Dst, Scheme = DefaultApprox>
where Scheme: ApproxScheme,
{ type Err: Error; // Required method fn approx_into(self) -> Result<Dst, Self::Err>; }
Expand description

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

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

Required Associated Types§

Source

type Err: Error

The error type produced by a failed conversion.

Required Methods§

Source

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

Convert the subject into an approximately equivalent representation.

Implementors§

Source§

impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src
where Dst: ApproxFrom<Src, Scheme>, Scheme: ApproxScheme,

Source§

type Err = <Dst as ApproxFrom<Src, Scheme>>::Err