#[repr(C)]pub struct Buffer {
pub ptr: *mut u8,
pub cap: usize,
pub len: usize,
}Expand description
A caller-provided byte buffer.
APIs that write to this type use len for the number of bytes written on
GHOSTTY_SUCCESS and the required byte capacity on GHOSTTY_OUT_OF_SPACE.
Fields§
§ptr: *mut u8Destination buffer for bytes. May be NULL when cap is 0 to query required size.
cap: usizeCapacity of ptr in bytes.
len: usizeBytes written on success, or required byte capacity on GHOSTTY_OUT_OF_SPACE.
Trait Implementations§
Auto Trait Implementations§
impl !Send for Buffer
impl !Sync for Buffer
impl Freeze for Buffer
impl RefUnwindSafe for Buffer
impl Unpin for Buffer
impl UnsafeUnpin for Buffer
impl UnwindSafe for Buffer
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