pub struct CapacityContainerBuilder<C> { /* private fields */ }
Expand description
A default container builder that uses length and preferred capacity to chunk data.
Maintains a single empty allocation between Self::push_into
and Self::extract
, but not
across Self::finish
to maintain a low memory footprint.
Maintains FIFO order.
Implementations§
source§impl<C: Container> CapacityContainerBuilder<C>
impl<C: Container> CapacityContainerBuilder<C>
sourcepub fn push_container(&mut self, container: &mut C)
pub fn push_container(&mut self, container: &mut C)
Push a pre-formed container at this builder. This exists to maintain API compatibility.
Trait Implementations§
source§impl<C: Container> ContainerBuilder for CapacityContainerBuilder<C>
impl<C: Container> ContainerBuilder for CapacityContainerBuilder<C>
source§impl<C: Debug> Debug for CapacityContainerBuilder<C>
impl<C: Debug> Debug for CapacityContainerBuilder<C>
source§impl<C: Default> Default for CapacityContainerBuilder<C>
impl<C: Default> Default for CapacityContainerBuilder<C>
source§fn default() -> CapacityContainerBuilder<C>
fn default() -> CapacityContainerBuilder<C>
Returns the “default value” for a type. Read more
source§impl<T, C: SizableContainer + PushInto<T>> PushInto<T> for CapacityContainerBuilder<C>
impl<T, C: SizableContainer + PushInto<T>> PushInto<T> for CapacityContainerBuilder<C>
Auto Trait Implementations§
impl<C> Freeze for CapacityContainerBuilder<C>where
C: Freeze,
impl<C> RefUnwindSafe for CapacityContainerBuilder<C>where
C: RefUnwindSafe,
impl<C> Send for CapacityContainerBuilder<C>where
C: Send,
impl<C> Sync for CapacityContainerBuilder<C>where
C: Sync,
impl<C> Unpin for CapacityContainerBuilder<C>where
C: Unpin,
impl<C> UnwindSafe for CapacityContainerBuilder<C>where
C: UnwindSafe,
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