pub trait TryTruncateInto<T, E> {
    // Required method
    fn try_truncate_into(self) -> Result<T, E>;
}
Expand description

Convert one type to another by rounding to the nearest integer towards zero.

Errors

Traps when the input float cannot be represented by the target integer or when the input float is NaN.

Required Methods§

source

fn try_truncate_into(self) -> Result<T, E>

Convert one type to another by rounding to the nearest integer towards zero.

Implementations on Foreign Types§

source§

impl TryTruncateInto<i32, TrapCode> for f64

source§

impl TryTruncateInto<u32, TrapCode> for f32

source§

impl TryTruncateInto<u32, TrapCode> for f64

source§

impl TryTruncateInto<u64, TrapCode> for f32

source§

impl TryTruncateInto<i64, TrapCode> for f32

source§

impl TryTruncateInto<u64, TrapCode> for f64

source§

impl TryTruncateInto<i64, TrapCode> for f64

source§

impl TryTruncateInto<i32, TrapCode> for f32

Implementors§