Trait truncate_integer::TryTruncate[][src]

pub trait TryTruncate<T> {
    fn try_truncate(self) -> Option<T>;
}

Required methods

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

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

Implementations on Foreign Types

Implementors