Struct gnunet_sys::GNUNET_Buffer[][src]

#[repr(C)]pub struct GNUNET_Buffer {
    pub capacity: usize,
    pub position: usize,
    pub mem: *mut c_char,
    pub warn_grow: c_int,
}

Dynamically growing buffer. Can be used to construct strings and other objects with dynamic size.

This structure should, in most cases, be stack-allocated and zero-initialized, like:

struct GNUNET_Buffer my_buffer = { 0 };

Fields

capacity: usize

Capacity of the buffer.

position: usize

Current write position.

mem: *mut c_char

Backing memory.

warn_grow: c_int

Log a warning if the buffer is grown over its initially allocated capacity.

Trait Implementations

impl Clone for GNUNET_Buffer[src]

impl Copy for GNUNET_Buffer[src]

impl Debug for GNUNET_Buffer[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.