Trait To
Source pub trait To {
// Provided methods
fn to<T>(self) -> T
where Self: Into<T> { ... }
fn try_to<T>(self) -> Result<T, <Self as TryInto<T>>::Error>
where Self: TryInto<T> { ... }
}
Expand description
Extension trait providing the to
and try_to
methods.
Converts to T
by calling Into<T>::into
.
Tries to convert to T
by calling TryInto<T>::try_into
.
Source§Blanket impl for all types.
This makes sure that everything implements To
and
that no downstream impls can exist.