Struct starnix_uapi::user_buffer::UserBuffer
source · #[repr(C)]pub struct UserBuffer {
pub address: UserAddress,
pub length: usize,
}
Expand description
Matches iovec_t.
Fields§
§address: UserAddress
§length: usize
Implementations§
source§impl UserBuffer
impl UserBuffer
pub fn cap_buffers_to_max_rw_count( max_address: UserAddress, buffers: &mut UserBuffers ) -> Result<usize, Errno>
pub fn advance(&mut self, length: usize) -> Result<(), Errno>
Trait Implementations§
source§impl Clone for UserBuffer
impl Clone for UserBuffer
source§fn clone(&self) -> UserBuffer
fn clone(&self) -> UserBuffer
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 UserBuffer
impl Debug for UserBuffer
source§impl Default for UserBuffer
impl Default for UserBuffer
source§fn default() -> UserBuffer
fn default() -> UserBuffer
Returns the “default value” for a type. Read more
source§impl FromBytes for UserBufferwhere
UserAddress: FromBytes,
usize: FromBytes,
impl FromBytes for UserBufferwhere
UserAddress: FromBytes,
usize: 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 UserBufferwhere
UserAddress: FromZeros,
usize: FromZeros,
impl FromZeros for UserBufferwhere
UserAddress: FromZeros,
usize: FromZeros,
source§impl IntoBytes for UserBuffer
impl IntoBytes for UserBuffer
source§impl PartialEq for UserBuffer
impl PartialEq for UserBuffer
source§fn eq(&self, other: &UserBuffer) -> bool
fn eq(&self, other: &UserBuffer) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T> TryFrom<UserBuffer> for UserRef<T>
impl<T> TryFrom<UserBuffer> for UserRef<T>
impl Copy for UserBuffer
impl Eq for UserBuffer
impl StructuralPartialEq for UserBuffer
Auto Trait Implementations§
impl Freeze for UserBuffer
impl RefUnwindSafe for UserBuffer
impl Send for UserBuffer
impl Sync for UserBuffer
impl Unpin for UserBuffer
impl UnwindSafe for UserBuffer
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