Struct relay_cabi::RelayBuf
source · #[repr(C)]pub struct RelayBuf {
pub data: *mut u8,
pub len: usize,
pub owned: bool,
}
Expand description
A binary buffer of known length.
If the buffer is owned, indicated by the owned
flag, the owner must call the free
function
on this buffer. The convention is:
- When obtained as instance through return values, always free the buffer.
- When obtained as pointer through field access, never free the buffer.
Fields§
§data: *mut u8
Pointer to the raw data.
len: usize
The length of the buffer pointed to by data
.
owned: bool
Indicates that the buffer is owned and must be freed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RelayBuf
impl RefUnwindSafe for RelayBuf
impl !Send for RelayBuf
impl !Sync for RelayBuf
impl Unpin for RelayBuf
impl UnwindSafe for RelayBuf
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