[][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> Clone for WOVolAddress<T>[src]

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

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

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

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

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

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

Auto Trait Implementations

impl<T> !Send for WOVolAddress<T>

impl<T> !Sync for WOVolAddress<T>

impl<T> Unpin for WOVolAddress<T>

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.