Struct starnix_uapi::user_address::UserAddress
source · pub struct UserAddress(/* private fields */);
Implementations§
source§impl UserAddress
impl UserAddress
pub const NULL: Self = _
pub const fn const_from(value: u64) -> Self
pub fn from_ptr(ptr: zx_vaddr_t) -> Self
pub fn ptr(&self) -> zx_vaddr_t
pub fn round_up(&self, increment: u64) -> Result<UserAddress, Errno>
pub fn is_aligned(&self, alignment: u64) -> bool
pub fn is_null(&self) -> bool
pub fn checked_add(&self, rhs: usize) -> Option<UserAddress>
pub fn saturating_add(&self, rhs: usize) -> Self
Trait Implementations§
source§impl Add<u32> for UserAddress
impl Add<u32> for UserAddress
§type Output = UserAddress
type Output = UserAddress
The resulting type after applying the
+
operator.source§impl Add<u64> for UserAddress
impl Add<u64> for UserAddress
§type Output = UserAddress
type Output = UserAddress
The resulting type after applying the
+
operator.source§impl Add<usize> for UserAddress
impl Add<usize> for UserAddress
§type Output = UserAddress
type Output = UserAddress
The resulting type after applying the
+
operator.source§impl AddAssign<usize> for UserAddress
impl AddAssign<usize> for UserAddress
source§fn add_assign(&mut self, rhs: usize)
fn add_assign(&mut self, rhs: usize)
Performs the
+=
operation. Read moresource§impl Clone for UserAddress
impl Clone for UserAddress
source§fn clone(&self) -> UserAddress
fn clone(&self) -> UserAddress
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for UserAddress
impl Debug for UserAddress
source§impl Default for UserAddress
impl Default for UserAddress
source§impl Display for UserAddress
impl Display for UserAddress
source§impl<T> From<UserAddress> for UserRef<T>
impl<T> From<UserAddress> for UserRef<T>
source§fn from(user_address: UserAddress) -> Self
fn from(user_address: UserAddress) -> Self
Converts to this type from the input type.
source§impl From<UserAddress> for u64
impl From<UserAddress> for u64
source§fn from(value: UserAddress) -> Self
fn from(value: UserAddress) -> Self
Converts to this type from the input type.
source§impl From<UserAddress> for uaddr
impl From<UserAddress> for uaddr
source§fn from(value: UserAddress) -> Self
fn from(value: UserAddress) -> Self
Converts to this type from the input type.
source§impl<T> From<UserRef<T>> for UserAddress
impl<T> From<UserRef<T>> for UserAddress
source§fn from(user: UserRef<T>) -> UserAddress
fn from(user: UserRef<T>) -> UserAddress
Converts to this type from the input type.
source§impl From<u64> for UserAddress
impl From<u64> for UserAddress
source§impl From<uaddr> for UserAddress
impl From<uaddr> for UserAddress
source§impl FromBytes for UserAddresswhere
u64: FromBytes,
impl FromBytes for UserAddresswhere
u64: FromBytes,
§fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>where
Self: Sized + NoCell,
fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>where
Self: Sized + NoCell,
Interprets the prefix of the given
bytes
as a &[Self]
with length
equal to count
without copying. Read more§fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>where
Self: Sized + NoCell,
fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>where
Self: Sized + NoCell,
Interprets the suffix of the given
bytes
as a &[Self]
with length
equal to count
without copying. Read more§fn mut_slice_from_prefix(
bytes: &mut [u8],
count: usize
) -> Option<(&mut [Self], &mut [u8])>where
Self: Sized + IntoBytes + NoCell,
fn mut_slice_from_prefix(
bytes: &mut [u8],
count: usize
) -> Option<(&mut [Self], &mut [u8])>where
Self: Sized + IntoBytes + NoCell,
Interprets the prefix of the given
bytes
as a &mut [Self]
with length
equal to count
without copying. Read more§fn mut_slice_from_suffix(
bytes: &mut [u8],
count: usize
) -> Option<(&mut [u8], &mut [Self])>where
Self: Sized + IntoBytes + NoCell,
fn mut_slice_from_suffix(
bytes: &mut [u8],
count: usize
) -> Option<(&mut [u8], &mut [Self])>where
Self: Sized + IntoBytes + NoCell,
Interprets the suffix of the given
bytes
as a &mut [Self]
with length
equal to count
without copying. Read more§fn read_from_prefix(bytes: &[u8]) -> Option<Self>where
Self: Sized,
fn read_from_prefix(bytes: &[u8]) -> Option<Self>where
Self: Sized,
source§impl FromZeros for UserAddresswhere
u64: FromZeros,
impl FromZeros for UserAddresswhere
u64: FromZeros,
source§impl Hash for UserAddress
impl Hash for UserAddress
source§impl IntoBytes for UserAddresswhere
u64: IntoBytes,
impl IntoBytes for UserAddresswhere
u64: IntoBytes,
source§impl Ord for UserAddress
impl Ord for UserAddress
source§fn cmp(&self, other: &UserAddress) -> Ordering
fn cmp(&self, other: &UserAddress) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for UserAddress
impl PartialEq for UserAddress
source§fn eq(&self, other: &UserAddress) -> bool
fn eq(&self, other: &UserAddress) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for UserAddress
impl PartialOrd for UserAddress
source§fn partial_cmp(&self, other: &UserAddress) -> Option<Ordering>
fn partial_cmp(&self, other: &UserAddress) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Sub<u32> for UserAddress
impl Sub<u32> for UserAddress
§type Output = UserAddress
type Output = UserAddress
The resulting type after applying the
-
operator.source§impl Sub<u64> for UserAddress
impl Sub<u64> for UserAddress
§type Output = UserAddress
type Output = UserAddress
The resulting type after applying the
-
operator.source§impl Sub<usize> for UserAddress
impl Sub<usize> for UserAddress
§type Output = UserAddress
type Output = UserAddress
The resulting type after applying the
-
operator.source§impl Sub for UserAddress
impl Sub for UserAddress
source§impl SubAssign<usize> for UserAddress
impl SubAssign<usize> for UserAddress
source§fn sub_assign(&mut self, rhs: usize)
fn sub_assign(&mut self, rhs: usize)
Performs the
-=
operation. Read moreimpl Copy for UserAddress
impl Eq for UserAddress
impl StructuralPartialEq for UserAddress
Auto Trait Implementations§
impl Freeze for UserAddress
impl RefUnwindSafe for UserAddress
impl Send for UserAddress
impl Sync for UserAddress
impl Unpin for UserAddress
impl UnwindSafe for UserAddress
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more