Struct Buffer
#[repr(C)]
pub struct Buffer { pub(in ::bridge::buffer) data: *mut u8, pub(in ::bridge::buffer) len: usize, pub(in ::bridge::buffer) capacity: usize, pub(in ::bridge::buffer) reserve: extern "C" fn(Buffer, usize) -> Buffer, pub(in ::bridge::buffer) drop: extern "C" fn(Buffer) }
Fields
data: *mut u8len: usizecapacity: usizereserve: extern "C" fn(Buffer, usize) -> Bufferdrop: extern "C" fn(Buffer)
Implementations
impl Buffer
fn new() -> Selffn clear(&mut self)fn take(&mut self) -> Selffn extend_from_array<const N: usize>(&mut self, xs: &[u8; N])fn extend_from_slice(&mut self, xs: &[u8])fn push(&mut self, v: u8)
Trait Implementations
impl Default for Buffer
fn default() -> Self
impl Deref for Buffer
type Target = [u8];fn deref(&self) -> &[u8]
impl Drop for Buffer
fn drop(&mut self)
impl From<Vec<u8>> for Buffer
fn from(v: Vec<u8>) -> Self
impl Send for Buffer
impl Sync for Buffer
Auto Trait Implementations
impl Freeze for Buffer
impl RefUnwindSafe for Buffer
impl Unpin for Buffer
impl UnsafeUnpin for Buffer
impl UnwindSafe for Buffer
Blanket Implementations
impl<P, T> Receiver for Buffer
where
P: Deref<Target = T> + ?Sized,
T: ?Sized,
type Target = T;
impl<T> Any for Buffer
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Buffer
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Buffer
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for Buffer
fn from(t: T) -> TReturns the argument unchanged.
impl<T> SizeHint for Buffer
where
T: ?Sized,
fn lower_bound(&self) -> usizefn upper_bound(&self) -> Option<usize>
impl<T> SizedTypeProperties for Buffer
impl<T, U> Into<U> for Buffer
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Buffer
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for Buffer
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>