Module easy_cast::traits

source ·
Expand description

Traits

This module only contains traits, allowing relatively safe glob-import:

use easy_cast::traits::*;

let x = i32::conv_nearest(8.5);
let y: f32 = 12.cast();

Traits

Like Into, but for Conv
Like Into, but for ConvFloat
Like From, but supports fallible conversions
Like From, but for approximate numerical conversions
Nearest / floor / ceiling conversions from floating point types