pub struct ConstMaxSizeRetentionPolicy<const SIZE: usize>;Expand description
A policy that retains buffers up to a maximum size.
Trait Implementations§
source§impl<const SIZE: usize> BufferRetentionPolicy for ConstMaxSizeRetentionPolicy<SIZE>
impl<const SIZE: usize> BufferRetentionPolicy for ConstMaxSizeRetentionPolicy<SIZE>
fn should_retain(&self, capacity: usize) -> bool
source§impl<const SIZE: usize> Clone for ConstMaxSizeRetentionPolicy<SIZE>
impl<const SIZE: usize> Clone for ConstMaxSizeRetentionPolicy<SIZE>
source§fn clone(&self) -> ConstMaxSizeRetentionPolicy<SIZE>
fn clone(&self) -> ConstMaxSizeRetentionPolicy<SIZE>
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 moresource§impl<const SIZE: usize> Default for ConstMaxSizeRetentionPolicy<SIZE>
impl<const SIZE: usize> Default for ConstMaxSizeRetentionPolicy<SIZE>
source§fn default() -> ConstMaxSizeRetentionPolicy<SIZE>
fn default() -> ConstMaxSizeRetentionPolicy<SIZE>
Returns the “default value” for a type. Read more
impl<const SIZE: usize> Copy for ConstMaxSizeRetentionPolicy<SIZE>
Auto Trait Implementations§
impl<const SIZE: usize> Freeze for ConstMaxSizeRetentionPolicy<SIZE>
impl<const SIZE: usize> RefUnwindSafe for ConstMaxSizeRetentionPolicy<SIZE>
impl<const SIZE: usize> Send for ConstMaxSizeRetentionPolicy<SIZE>
impl<const SIZE: usize> Sync for ConstMaxSizeRetentionPolicy<SIZE>
impl<const SIZE: usize> Unpin for ConstMaxSizeRetentionPolicy<SIZE>
impl<const SIZE: usize> UnwindSafe for ConstMaxSizeRetentionPolicy<SIZE>
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.