pub struct VolatileConfig { /* private fields */ }Expand description
Configuration for the volatile memory buffer.
Implementations§
Source§impl VolatileConfig
impl VolatileConfig
Sourcepub fn new(capacity: NonZeroUsize) -> Self
pub fn new(capacity: NonZeroUsize) -> Self
Creates a configuration with the provided capacity.
Sourcepub fn with_max_total_bytes(self, max_total_bytes: NonZeroUsize) -> Self
pub fn with_max_total_bytes(self, max_total_bytes: NonZeroUsize) -> Self
Sets the optional total byte ceiling for the buffer.
Sourcepub const fn capacity(self) -> NonZeroUsize
pub const fn capacity(self) -> NonZeroUsize
Returns the configured capacity.
Sourcepub const fn max_total_bytes(self) -> Option<NonZeroUsize>
pub const fn max_total_bytes(self) -> Option<NonZeroUsize>
Returns the maximum total bytes, if configured.
Trait Implementations§
Source§impl Clone for VolatileConfig
impl Clone for VolatileConfig
Source§fn clone(&self) -> VolatileConfig
fn clone(&self) -> VolatileConfig
Returns a duplicate 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 moreSource§impl Debug for VolatileConfig
impl Debug for VolatileConfig
Source§impl Default for VolatileConfig
impl Default for VolatileConfig
impl Copy for VolatileConfig
Auto Trait Implementations§
impl Freeze for VolatileConfig
impl RefUnwindSafe for VolatileConfig
impl Send for VolatileConfig
impl Sync for VolatileConfig
impl Unpin for VolatileConfig
impl UnwindSafe for VolatileConfig
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