pub struct BufExtend(pub Arc<dyn AsBufExtend>);
Expand description
A concrete extendable buffer type that may or may not be mem_locked.
Tuple Fields
0: Arc<dyn AsBufExtend>
Implementations
sourceimpl BufExtend
impl BufExtend
sourcepub fn new_no_lock(initial_capacity: usize) -> Self
pub fn new_no_lock(initial_capacity: usize) -> Self
Construct a new extendable buffer with given capacity. It’s ok / still fairly efficient to set this to zero.
sourcepub fn extend_lock(&self) -> ExtendGuard<'_>
pub fn extend_lock(&self) -> ExtendGuard<'_>
Obtain access to extend the underlying buffer.
sourcepub fn write_lock(&self) -> WriteGuard<'_>
pub fn write_lock(&self) -> WriteGuard<'_>
Obtain write access to the underlying buffer.
Trait Implementations
sourceimpl<const N: usize> From<BufWriteSized<N>> for BufExtend
impl<const N: usize> From<BufWriteSized<N>> for BufExtend
sourcefn from(b: BufWriteSized<N>) -> Self
fn from(b: BufWriteSized<N>) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for BufExtend
impl Send for BufExtend
impl Sync for BufExtend
impl Unpin for BufExtend
impl !UnwindSafe for BufExtend
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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