[−][src]Struct voladdress::read_only::ROVolAddress
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]
T: Copy,
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(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T> Copy for ROVolAddress<T>
[src]
impl<T> Debug for ROVolAddress<T>
[src]
impl<T> Eq for ROVolAddress<T>
[src]
impl<T> Ord for ROVolAddress<T>
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<T> PartialEq<ROVolAddress<T>> for ROVolAddress<T>
[src]
impl<T> PartialOrd<ROVolAddress<T>> for ROVolAddress<T>
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<T> Pointer for ROVolAddress<T>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
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>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,