Struct gnunet_sys::GNUNET_Buffer [−][src]
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]
fn clone(&self) -> GNUNET_Buffer
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for GNUNET_Buffer
[src]
impl Debug for GNUNET_Buffer
[src]
Auto Trait Implementations
impl RefUnwindSafe for GNUNET_Buffer
impl !Send for GNUNET_Buffer
impl !Sync for GNUNET_Buffer
impl Unpin for GNUNET_Buffer
impl UnwindSafe for GNUNET_Buffer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,