#[repr(C)]pub struct RuntimeBytesMutRef {
pub ptr: *mut u8,
pub len: usize,
}Expand description
Borrowed mutable byte slice passed across the C ABI.
This is a uniquely borrowed view into memory owned by the caller. The callee may mutate the bytes only during the ABI call or visitor callback and must not retain the pointer after it returns.
Fields§
§ptr: *mut u8Pointer to the first byte, or null when len == 0.
len: usizeNumber of bytes available at ptr.
Implementations§
Source§impl RuntimeBytesMutRef
impl RuntimeBytesMutRef
Sourcepub fn from_slice(bytes: &mut [u8]) -> Self
pub fn from_slice(bytes: &mut [u8]) -> Self
Creates a mutable byte reference from a Rust slice.
Trait Implementations§
Source§impl Clone for RuntimeBytesMutRef
impl Clone for RuntimeBytesMutRef
Source§fn clone(&self) -> RuntimeBytesMutRef
fn clone(&self) -> RuntimeBytesMutRef
Returns a duplicate 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 RuntimeBytesMutRef
impl Debug for RuntimeBytesMutRef
Source§impl PartialEq for RuntimeBytesMutRef
impl PartialEq for RuntimeBytesMutRef
impl Copy for RuntimeBytesMutRef
impl Eq for RuntimeBytesMutRef
impl StructuralPartialEq for RuntimeBytesMutRef
Auto Trait Implementations§
impl Freeze for RuntimeBytesMutRef
impl RefUnwindSafe for RuntimeBytesMutRef
impl !Send for RuntimeBytesMutRef
impl !Sync for RuntimeBytesMutRef
impl Unpin for RuntimeBytesMutRef
impl UnsafeUnpin for RuntimeBytesMutRef
impl UnwindSafe for RuntimeBytesMutRef
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