Trait twelve_bit::u12::FailableInto [] [src]

pub trait FailableInto<T> where
    Self: Sized,
    T: Sized
{ fn failable_into(self) -> Option<T>; fn unchecked_into(self) -> T { ... } }

Trait for implementing failable conversions in a generic way.

Required Methods

Returns the receiver as Some(T) if non-truncating, or None.

Provided Methods

Returns the receiver as T by using failable_into() and unwrapping the result.

Panics

This method will panic if failable_into fails.

Implementors