Trait truncate_integer::TryTruncateFrom[][src]

pub trait TryTruncateFrom<T>: Sized {
    fn try_truncate_from(value: T) -> Option<Self>;
}

Required methods

Try to truncate an integer to fit into a smaller type.

If the value fits into the Self type, return Ok(value) Otherwise, return None.

Implementors