pub trait MaybeInto<T> {
    // Required method
    fn maybe_into(self) -> Option<T>;
}
Expand description

Like TryInto<T> but instead of returning a Result<Ok, Err> it returns simply an Option<T>. Semantically identical to Result<Ok, Err>.ok()

Required Methods§

source

fn maybe_into(self) -> Option<T>

Implementors§

source§

impl<T, U> MaybeInto<U> for T
where U: MaybeFrom<T>,