#[repr(C)]pub struct aws_byte_buf {
pub len: usize,
pub buffer: *mut u8,
pub capacity: usize,
pub allocator: *mut aws_allocator,
}
Expand description
Represents a length-delimited binary string or buffer. If byte buffer points to constant memory or memory that should otherwise not be freed by this struct, set allocator to NULL and free function will be a no-op.
This structure used to define the output for all functions that write to a buffer.
Note that this structure allocates memory at the buffer pointer only. The struct itself does not get dynamically allocated and must be either maintained or copied to avoid losing access to the memory.
Fields
len: usize
buffer: *mut u8
capacity: usize
allocator: *mut aws_allocator
Trait Implementations
sourceimpl Clone for aws_byte_buf
impl Clone for aws_byte_buf
sourcefn clone(&self) -> aws_byte_buf
fn clone(&self) -> aws_byte_buf
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for aws_byte_buf
impl Debug for aws_byte_buf
sourceimpl Default for aws_byte_buf
impl Default for aws_byte_buf
sourceimpl PartialEq<aws_byte_buf> for aws_byte_buf
impl PartialEq<aws_byte_buf> for aws_byte_buf
sourcefn eq(&self, other: &aws_byte_buf) -> bool
fn eq(&self, other: &aws_byte_buf) -> bool
impl Copy for aws_byte_buf
impl Eq for aws_byte_buf
impl StructuralEq for aws_byte_buf
impl StructuralPartialEq for aws_byte_buf
Auto Trait Implementations
impl RefUnwindSafe for aws_byte_buf
impl !Send for aws_byte_buf
impl !Sync for aws_byte_buf
impl Unpin for aws_byte_buf
impl UnwindSafe for aws_byte_buf
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more