Skip to main content

RegionSize

Enum RegionSize 

Source
pub enum RegionSize {
Show 32 variants Invalid = 0, _4B = 1, _8B = 2, _16B = 3, _32B = 4, _64B = 5, _128B = 6, _256B = 7, _512b = 8, _1K = 9, _2K = 10, _4K = 11, _8K = 12, _16K = 13, _32K = 14, _64K = 15, _128K = 16, _256K = 17, _512K = 18, _1M = 19, _2M = 20, _4M = 21, _8M = 22, _16M = 23, _32M = 24, _64M = 25, _128M = 26, _256M = 27, _512M = 28, _1G = 29, _2G = 30, _4G = 31,
}
Expand description

The size of a region

Variants§

§

Invalid = 0

A value of 0 is not permitted, this value is reserved and unpredictable.

§

_4B = 1

N = 1 => 4 bytes

§

_8B = 2

N = 2 => 8 bytes

§

_16B = 3

N = 3 => 16 bytes

§

_32B = 4

N = 4 => 32 BYTES

§

_64B = 5

N = 5 => 64 bytes

§

_128B = 6

N = 6 => 128 bytes

§

_256B = 7

N = 7 => 256 bytes

§

_512b = 8

N = 8 => 512 bytes

§

_1K = 9

N = 9 => 1 KiB

§

_2K = 10

N = 10 => 2 KiB

§

_4K = 11

N = 11 => 4 KiB

§

_8K = 12

N = 12 => 8 KiB

§

_16K = 13

N = 13 => 16 KiB

§

_32K = 14

N = 14 => 32 KiB

§

_64K = 15

N = 15 => 64 KiB

§

_128K = 16

N = 16 => 128 KiB

§

_256K = 17

N = 17 => 256 KiB

§

_512K = 18

N = 18 => 512 KiB

§

_1M = 19

N = 19 => 1 MiB

§

_2M = 20

N = 20 => 2 MiB

§

_4M = 21

N = 21 => 4 MiB

§

_8M = 22

N = 22 => 8 MiB

§

_16M = 23

N = 23 => 16 MiB

§

_32M = 24

N = 24 => 32 MiB

§

_64M = 25

N = 25 => 64 MiB

§

_128M = 26

N = 26 => 128 MiB

§

_256M = 27

N = 27 => 256 MiB

§

_512M = 28

N = 28 => 512 MiB

§

_1G = 29

N = 29 => 1 GiB

§

_2G = 30

N = 30 => 2 GiB

§

_4G = 31

N = 31 => 4 GiB

Implementations§

Source§

impl RegionSize

Source

pub const fn raw_value(self) -> UInt<u8, 5usize>

Returns the underlying raw value of this bitfield.

Source

pub const fn new_with_raw_value(value: UInt<u8, 5usize>) -> Self

Creates a new instance of this bitfield with the given raw value.

Source§

impl RegionSize

Source

pub fn is_aligned(&self, addr: *const u8) -> bool

Check address alignment

Reports whether an address is aligned according to this region size

Trait Implementations§

Source§

impl Clone for RegionSize

Source§

fn clone(&self) -> RegionSize

Returns a duplicate of the value. Read more
1.0.0 (const: unstable)§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for RegionSize

Source§

impl Debug for RegionSize

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for RegionSize

Source§

impl PartialEq for RegionSize

Source§

fn eq(&self, other: &RegionSize) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable)§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for RegionSize

Auto Trait Implementations§

§

impl Freeze for RegionSize

§

impl RefUnwindSafe for RegionSize

§

impl Send for RegionSize

§

impl Sync for RegionSize

§

impl Unpin for RegionSize

§

impl UnsafeUnpin for RegionSize

§

impl UnwindSafe for RegionSize

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.