#[repr(C)]pub struct CortexBuffer {
pub ptr: *mut u8,
pub len: usize,
pub cap: usize,
}Expand description
Native ABI-owned byte buffer.
All strings and JSON values that cross the stable native ABI boundary use
this representation. Buffers returned by the plugin must be released by
calling the table’s buffer_free function.
Fields§
§ptr: *mut u8Pointer to UTF-8 bytes.
len: usizeNumber of initialized bytes at ptr.
cap: usizeAllocation capacity needed to reconstruct and free the buffer.
Implementations§
Source§impl CortexBuffer
impl CortexBuffer
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CortexBuffer
impl RefUnwindSafe for CortexBuffer
impl !Send for CortexBuffer
impl !Sync for CortexBuffer
impl Unpin for CortexBuffer
impl UnsafeUnpin for CortexBuffer
impl UnwindSafe for CortexBuffer
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