Skip to main content

U32Ext

Trait U32Ext 

Source
pub trait U32Ext {
    // Required methods
    fn contains(self, flag: u32) -> bool;
    fn lower_u16(self) -> u16;
    fn higher_u16(self) -> u16;
    fn set_lower_u16(&mut self, lower: u16);
    fn set_higher_u16(&mut self, higher: u16);
}
Expand description

Convenience extension methods for u32 (for bit handling).

Required Methods§

Source

fn contains(self, flag: u32) -> bool

Checks whether this value contains the bits set in flag.

Source

fn lower_u16(self) -> u16

Obtains the lower 16 bits.

Source

fn higher_u16(self) -> u16

Obtains the higher 16 bits.

Source

fn set_lower_u16(&mut self, lower: u16)

Sets the lower 16 bits.

Source

fn set_higher_u16(&mut self, higher: u16)

Sets the higher 16 bits.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl U32Ext for u32

Source§

fn contains(self, flag: u32) -> bool

Source§

fn lower_u16(self) -> u16

Source§

fn higher_u16(self) -> u16

Source§

fn set_lower_u16(&mut self, lower: u16)

Source§

fn set_higher_u16(&mut self, higher: u16)

Implementors§