You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pub trait TryInto<T, S> {
/// Attempts to convert the input type T into the output type S.
/// In the event of a conversion error, returns [`None`].
///
/// # Examples
///
/// ```
/// let a: Option<u8> = 1_u16.try_into();
/// assert!(a == Some(1));
/// let b: Option<u8> = 256_u16.try_into();
/// assert!(b == None);
/// ```
fn try_into(self: T) -> Option<S>;
}