Struct starnix_uapi::user_address::UserCString
source · pub struct UserCString(/* private fields */);
Implementations§
source§impl UserCString
impl UserCString
pub fn new(addr: UserAddress) -> UserCString
pub fn addr(&self) -> UserAddress
Methods from Deref<Target = UserAddress>§
pub const NULL: 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 Clone for UserCString
impl Clone for UserCString
source§fn clone(&self) -> UserCString
fn clone(&self) -> UserCString
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 UserCString
impl Debug for UserCString
source§impl Default for UserCString
impl Default for UserCString
source§fn default() -> UserCString
fn default() -> UserCString
Returns the “default value” for a type. Read more
source§impl Deref for UserCString
impl Deref for UserCString
§type Target = UserAddress
type Target = UserAddress
The resulting type after dereferencing.
source§fn deref(&self) -> &UserAddress
fn deref(&self) -> &UserAddress
Dereferences the value.
source§impl Display for UserCString
impl Display for UserCString
source§impl FromBytes for UserCStringwhere
UserAddress: FromBytes,
impl FromBytes for UserCStringwhere
UserAddress: 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 UserCStringwhere
UserAddress: FromZeros,
impl FromZeros for UserCStringwhere
UserAddress: FromZeros,
source§impl Hash for UserCString
impl Hash for UserCString
source§impl IntoBytes for UserCStringwhere
UserAddress: IntoBytes,
impl IntoBytes for UserCStringwhere
UserAddress: IntoBytes,
source§impl Ord for UserCString
impl Ord for UserCString
source§fn cmp(&self, other: &UserCString) -> Ordering
fn cmp(&self, other: &UserCString) -> 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 UserCString
impl PartialEq for UserCString
source§fn eq(&self, other: &UserCString) -> bool
fn eq(&self, other: &UserCString) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for UserCString
impl PartialOrd for UserCString
source§fn partial_cmp(&self, other: &UserCString) -> Option<Ordering>
fn partial_cmp(&self, other: &UserCString) -> 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 moreimpl Copy for UserCString
impl Eq for UserCString
impl StructuralPartialEq for UserCString
Auto Trait Implementations§
impl Freeze for UserCString
impl RefUnwindSafe for UserCString
impl Send for UserCString
impl Sync for UserCString
impl Unpin for UserCString
impl UnwindSafe for UserCString
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