pub struct FramePoolConfig {
pub pre_allocate: usize,
pub max_size: usize,
pub frame_bytes: usize,
}Expand description
Configuration for pre-allocating raw byte buffers in a FramePool.
Use FramePool::with_config to construct a pool that eagerly allocates
pre_allocate buffers of frame_bytes bytes each before the first call to
FramePool::acquire_raw.
Fields§
§pre_allocate: usizeNumber of raw byte buffers to allocate at construction time.
max_size: usizeHard cap on the total number of pooled raw buffers.
frame_bytes: usizeSize in bytes of each raw buffer (width * height * channels).
Trait Implementations§
Source§impl Clone for FramePoolConfig
impl Clone for FramePoolConfig
Source§fn clone(&self) -> FramePoolConfig
fn clone(&self) -> FramePoolConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FramePoolConfig
impl Debug for FramePoolConfig
Auto Trait Implementations§
impl Freeze for FramePoolConfig
impl RefUnwindSafe for FramePoolConfig
impl Send for FramePoolConfig
impl Sync for FramePoolConfig
impl Unpin for FramePoolConfig
impl UnsafeUnpin for FramePoolConfig
impl UnwindSafe for FramePoolConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more