Trait to_method::To[][src]

pub trait To {
    fn to<T>(self) -> T
    where
        Self: Into<T>
, { ... }
fn try_to<T>(self) -> Result<T, Self::Error>
    where
        Self: TryInto<T>
, { ... } }
Expand description

Extension trait providing the to and try_to methods.

Provided methods

fn to<T>(self) -> T where
    Self: Into<T>, 
[src]

Expand description

Converts to T by calling Into<T>::into.

fn try_to<T>(self) -> Result<T, Self::Error> where
    Self: TryInto<T>, 
[src]

Expand description

Tries to convert to T by calling TryInto<T>::try_into.

Implementors

impl<T: ?Sized> To for T[src]

Blanket impl for all types. This makes sure that everything implements To and that no downstream impls can exist.