Trait gardiz::bits::CastUnsigned

source ·
pub trait CastUnsigned: Signed {
    type Target;

    // Required method
    fn cast_unsigned(&self) -> Self::Target;
}
Expand description

Trait for bit-casts from 2’s complement signed integers to unsigned integers.

Required Associated Types§

source

type Target

Type of the target unsigned version.

Required Methods§

source

fn cast_unsigned(&self) -> Self::Target

Bit-casts the given (self) signed number into an unsigned version.

Implementations on Foreign Types§

source§

impl CastUnsigned for isize

§

type Target = usize

source§

fn cast_unsigned(&self) -> Self::Target

source§

impl CastUnsigned for i128

§

type Target = u128

source§

fn cast_unsigned(&self) -> Self::Target

source§

impl CastUnsigned for i64

§

type Target = u64

source§

fn cast_unsigned(&self) -> Self::Target

source§

impl CastUnsigned for i16

§

type Target = u16

source§

fn cast_unsigned(&self) -> Self::Target

source§

impl CastUnsigned for i8

§

type Target = u8

source§

fn cast_unsigned(&self) -> Self::Target

source§

impl CastUnsigned for i32

§

type Target = u32

source§

fn cast_unsigned(&self) -> Self::Target

Implementors§

source§

impl<T> CastUnsigned for Vec2<T>where T: CastUnsigned,