binius_field::underlier

Trait NumCast

source
pub trait NumCast<From> {
    // Required method
    fn num_cast_from(val: From) -> Self;
}
Expand description

A trait that represents potentially lossy numeric cast. Is a drop-in replacement of as _ in a generic code.

Required Methods§

source

fn num_cast_from(val: From) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl NumCast<u8> for u16

source§

fn num_cast_from(val: u8) -> Self

source§

impl NumCast<u8> for u32

source§

fn num_cast_from(val: u8) -> Self

source§

impl NumCast<u8> for u64

source§

fn num_cast_from(val: u8) -> Self

source§

impl NumCast<u8> for u128

source§

fn num_cast_from(val: u8) -> Self

source§

impl NumCast<u16> for u8

source§

fn num_cast_from(val: u16) -> Self

source§

impl NumCast<u16> for u32

source§

fn num_cast_from(val: u16) -> Self

source§

impl NumCast<u16> for u64

source§

fn num_cast_from(val: u16) -> Self

source§

impl NumCast<u16> for u128

source§

fn num_cast_from(val: u16) -> Self

source§

impl NumCast<u32> for u8

source§

fn num_cast_from(val: u32) -> Self

source§

impl NumCast<u32> for u16

source§

fn num_cast_from(val: u32) -> Self

source§

impl NumCast<u32> for u64

source§

fn num_cast_from(val: u32) -> Self

source§

impl NumCast<u32> for u128

source§

fn num_cast_from(val: u32) -> Self

source§

impl NumCast<u64> for u8

source§

fn num_cast_from(val: u64) -> Self

source§

impl NumCast<u64> for u16

source§

fn num_cast_from(val: u64) -> Self

source§

impl NumCast<u64> for u32

source§

fn num_cast_from(val: u64) -> Self

source§

impl NumCast<u64> for u128

source§

fn num_cast_from(val: u64) -> Self

source§

impl NumCast<u128> for u8

source§

fn num_cast_from(val: u128) -> Self

source§

impl NumCast<u128> for u16

source§

fn num_cast_from(val: u128) -> Self

source§

impl NumCast<u128> for u32

source§

fn num_cast_from(val: u128) -> Self

source§

impl NumCast<u128> for u64

source§

fn num_cast_from(val: u128) -> Self

source§

impl NumCast<SmallU<1>> for u8

source§

fn num_cast_from(val: U1) -> Self

source§

impl NumCast<SmallU<1>> for u16

source§

fn num_cast_from(val: U1) -> Self

source§

impl NumCast<SmallU<1>> for u32

source§

fn num_cast_from(val: U1) -> Self

source§

impl NumCast<SmallU<1>> for u64

source§

fn num_cast_from(val: U1) -> Self

source§

impl NumCast<SmallU<1>> for u128

source§

fn num_cast_from(val: U1) -> Self

source§

impl NumCast<SmallU<2>> for u8

source§

fn num_cast_from(val: U2) -> Self

source§

impl NumCast<SmallU<2>> for u16

source§

fn num_cast_from(val: U2) -> Self

source§

impl NumCast<SmallU<2>> for u32

source§

fn num_cast_from(val: U2) -> Self

source§

impl NumCast<SmallU<2>> for u64

source§

fn num_cast_from(val: U2) -> Self

source§

impl NumCast<SmallU<2>> for u128

source§

fn num_cast_from(val: U2) -> Self

source§

impl NumCast<SmallU<4>> for u8

source§

fn num_cast_from(val: U4) -> Self

source§

impl NumCast<SmallU<4>> for u16

source§

fn num_cast_from(val: U4) -> Self

source§

impl NumCast<SmallU<4>> for u32

source§

fn num_cast_from(val: U4) -> Self

source§

impl NumCast<SmallU<4>> for u64

source§

fn num_cast_from(val: U4) -> Self

source§

impl NumCast<SmallU<4>> for u128

source§

fn num_cast_from(val: U4) -> Self

Implementors§