[][src]Struct voladdress::read_only::ROVolAddress

#[repr(transparent)]
pub struct ROVolAddress<T> { /* fields omitted */ }

As VolAddress, but read only.

Methods

impl<T> ROVolAddress<T>[src]

pub const unsafe fn new(address: usize) -> Self[src]

Constructs a new address.

Safety

You must follow the standard safety rules as outlined in the type docs.

pub const unsafe fn cast<Z>(self) -> ROVolAddress<Z>[src]

Casts the type of T into type Z.

Safety

You must follow the standard safety rules as outlined in the type docs.

pub const unsafe fn offset(self, offset: isize) -> Self[src]

Offsets the address by offset slots (like pointer::wrapping_offset).

Safety

You must follow the standard safety rules as outlined in the type docs.

pub const fn is_aligned(self) -> bool[src]

Checks that the current target type of this address is aligned at this address value.

pub const fn to_usize(self) -> usize[src]

The usize value of this ROVolAddress.

Important traits for ROVolIter<T>
pub const unsafe fn iter_slots(self, slots: usize) -> ROVolIter<T>[src]

Makes an iterator starting here across the given number of slots.

Safety

The normal safety rules must be correct for each address iterated over.

pub fn read(self) -> T where
    T: Copy
[src]

Volatile reads a Copy value out of the address.

pub unsafe fn read_non_copy(self) -> T[src]

Volatile reads a value out of the address with no trait bound.

Safety

This is not a move, it forms a bit duplicate of the current value at the address. If T has a Drop trait that does anything it is up to you to ensure that repeated drops do not cause UB (such as a double free).

Trait Implementations

impl<T> Clone for ROVolAddress<T>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T> Copy for ROVolAddress<T>[src]

impl<T> PartialEq<ROVolAddress<T>> for ROVolAddress<T>[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl<T> Eq for ROVolAddress<T>[src]

impl<T> Ord for ROVolAddress<T>[src]

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl<T> PartialOrd<ROVolAddress<T>> for ROVolAddress<T>[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T> Debug for ROVolAddress<T>[src]

impl<T> Pointer for ROVolAddress<T>[src]

fn fmt(&self, f: &mut Formatter) -> Result[src]

You can request pointer style to get just the inner value with pointer formatting.

Auto Trait Implementations

impl<T> !Send for ROVolAddress<T>

impl<T> !Sync for ROVolAddress<T>

Blanket Implementations

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same for T[src]

type Output = T

Should always be Self