[][src]Struct voladdress::write_only::WOVolAddress

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

As VolAddress, but write only.

Methods

impl<T> WOVolAddress<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) -> WOVolAddress<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 WOVolAddress.

Important traits for WOVolIter<T>
pub const unsafe fn iter_slots(self, slots: usize) -> WOVolIter<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 write(self, val: T)[src]

Volatile writes a value to the address.

Semantically, the value is moved into the function and then forgotten, so if T has a Drop impl then that will never get executed. This is "safe" under Rust's safety rules, but could cause something unintended (eg: a memory leak).

Trait Implementations

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

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

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

This method tests for !=.

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

impl<T> Ord for WOVolAddress<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<WOVolAddress<T>> for WOVolAddress<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> Copy for WOVolAddress<T>[src]

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

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

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

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

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

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<T> !Send for WOVolAddress<T>

impl<T> !Sync for WOVolAddress<T>

Blanket Implementations

impl<T> From for T[src]

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

type Error = Infallible

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

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