Struct wyz::comu::Address [−][src]
pub struct Address<M, T> where
M: Mutability,
T: ?Sized, { /* fields omitted */ }
Expand description
A generic non-null pointer with type-system mutability tracking.
Type Parameters
M
: The mutability permissions of the source pointer.T
: The referent type of the source pointer.
Implementations
Constructs a new Address
over some pointer value.
You are responsible for selecting the correct Mutability
marker.
Permanently converts an Address<_>
into an Address<Const>
.
You should generally prefer Address::freeze
.
Force an Address<Const>
to be Address<Mut>
.
Safety
You should only call this on addresses you know to have been created
with Mut
able permissions and previously removed by Address::immut
.
You should prefer using Address::freeze
for temporary, trackable,
immutability constraints instead.
Removes the Address
type marker, returning the original pointer.
Port of the pointer inherent methods on Address
es of Sized
types.
Applies <*T>::cast
.
Applies <*T>::offset
.
Applies <*T>::add
.
Applies <*T>::sub
.
Applies <*T>::wrapping_offset
.
Applies <*T>::wrapping_add
.
Applies <*T>::wrapping_sub
.
Applies <*T>::offset_from
.
Applies <*T>::read
.
Applies <*T>::read_volatile
.
Applies <*T>::read_unaligned
.
Applies <*T>::copy_to
.
Applies <*T>::copy_to_nonoverlapping
.
Applies <*T>::align_offset
.
Port of the pointer inherent methods on Address
es of any type.
Applies <*T>::as_ref
.
Port of pointer inherent methods on mutable Address
es of sized types.
Applies <*T>::copy_from
.
pub unsafe fn copy_from_nonoverlapping<M2: Mutability>(
self,
src: Address<M2, T>,
count: usize
)
pub unsafe fn copy_from_nonoverlapping<M2: Mutability>(
self,
src: Address<M2, T>,
count: usize
)
Applies <*T>::copy_from_nonoverlapping
.
Applies <*T>::write
.
Applies <*T>::write_volatile
.
Applies <*T>::write_unaligned
.
Applies <*T>::replace
.
Applies <*T>::swap
.
Port of pointer inherent methods on mutable Address
es of any type.
Applies <*T>::as_mut
.
Applies <*T>::drop_in_place
.
Trait Implementations
impl<M1, M2, T1, T2> PartialEq<Address<M2, T2>> for Address<M1, T1> where
M1: Mutability,
M2: Mutability,
impl<M1, M2, T1, T2> PartialEq<Address<M2, T2>> for Address<M1, T1> where
M1: Mutability,
M2: Mutability,
impl<M1, M2, T1, T2> PartialOrd<Address<M2, T2>> for Address<M1, T1> where
M1: Mutability,
M2: Mutability,
impl<M1, M2, T1, T2> PartialOrd<Address<M2, T2>> for Address<M1, T1> where
M1: Mutability,
M2: Mutability,
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
type ElementAddr = Address<Const, T>
type ElementAddr = Address<Const, T>
The type of the element pointer.
Constructs an ordinary slice reference from a base-address and a length. Read more
type ElementAddr = Address<Frozen<M>, T>
type ElementAddr = Address<Frozen<M>, T>
The type of the element pointer.
Constructs an ordinary slice reference from a base-address and a length. Read more
type ElementAddr = Address<Mut, T>
type ElementAddr = Address<Mut, T>
The type of the element pointer.
Constructs an ordinary slice reference from a base-address and a length. Read more
Auto Trait Implementations
impl<M, T: ?Sized> RefUnwindSafe for Address<M, T> where
M: RefUnwindSafe,
T: RefUnwindSafe,
impl<M, T: ?Sized> UnwindSafe for Address<M, T> where
M: UnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Causes self
to use its Binary
implementation when Debug
-formatted. Read more
Causes self
to use its Display
implementation when
Debug
-formatted. Read more
Causes self
to use its LowerExp
implementation when
Debug
-formatted. Read more
Causes self
to use its LowerHex
implementation when
Debug
-formatted. Read more
Causes self
to use its Octal
implementation when Debug
-formatted. Read more
Causes self
to use its Pointer
implementation when
Debug
-formatted. Read more
Causes self
to use its UpperExp
implementation when
Debug
-formatted. Read more
Causes self
to use its UpperHex
implementation when
Debug
-formatted. Read more
Pipes by value. This is generally the method you want to use. Read more
Borrows self
and passes that borrow into the pipe function. Read more
Mutably borrows self
and passes that borrow into the pipe function. Read more
Borrows self
, then passes self.borrow()
into the pipe function. Read more
Mutably borrows self
, then passes self.borrow_mut()
into the pipe
function. Read more
Borrows self
, then passes self.as_ref()
into the pipe function.
Mutably borrows self
, then passes self.as_mut()
into the pipe
function. Read more
Borrows self
, then passes self.deref()
into the pipe function.
Immutable access to the Borrow<B>
of a value. Read more
Mutable access to the BorrowMut<B>
of a value. Read more
Immutable access to the AsRef<R>
view of a value. Read more
Mutable access to the AsMut<R>
view of a value. Read more
Immutable access to the Deref::Target
of a value. Read more
Mutable access to the Deref::Target
of a value. Read more
Calls .tap()
only in debug builds, and is erased in release builds.
Calls .tap_mut()
only in debug builds, and is erased in release
builds. Read more
Calls .tap_borrow()
only in debug builds, and is erased in release
builds. Read more
Calls .tap_borrow_mut()
only in debug builds, and is erased in release
builds. Read more
Calls .tap_ref()
only in debug builds, and is erased in release
builds. Read more
Calls .tap_ref_mut()
only in debug builds, and is erased in release
builds. Read more
Calls .tap_deref()
only in debug builds, and is erased in release
builds. Read more