pub struct BytesRefill {
pub logic: Arc<dyn Fn(usize) -> Box<dyn DerefMut<Target = [u8]>> + Send + Sync>,
pub limit: Option<usize>,
}
Expand description
Ability to acquire and policy to retain byte buffers.
Fields§
§logic: Arc<dyn Fn(usize) -> Box<dyn DerefMut<Target = [u8]>> + Send + Sync>
Logic to acquire a new buffer of a certain number of bytes.
limit: Option<usize>
An optional limit on the number of empty buffers retained.
Trait Implementations§
Source§impl Clone for BytesRefill
impl Clone for BytesRefill
Source§fn clone(&self) -> BytesRefill
fn clone(&self) -> BytesRefill
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for BytesRefill
impl !RefUnwindSafe for BytesRefill
impl Send for BytesRefill
impl Sync for BytesRefill
impl Unpin for BytesRefill
impl !UnwindSafe for BytesRefill
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