Trait lexical_util::num::AsCast

source ·
pub trait AsCast: AsPrimitive {
    // Required method
    fn as_cast<N: AsPrimitive>(n: N) -> Self;
}
Expand description

An interface for casting between machine scalars.

Required Methods§

source

fn as_cast<N: AsPrimitive>(n: N) -> Self

Creates a number from another value that can be converted into a primitive via the AsPrimitive trait.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl AsCast for f32

source§

impl AsCast for f64

source§

impl AsCast for i8

source§

impl AsCast for i16

source§

impl AsCast for i32

source§

impl AsCast for i64

source§

impl AsCast for i128

source§

impl AsCast for isize

source§

impl AsCast for u8

source§

impl AsCast for u16

source§

impl AsCast for u32

source§

impl AsCast for u64

source§

impl AsCast for u128

source§

impl AsCast for usize

Implementors§