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