pub struct MemoryParameters {
pub buffer_size: usize,
pub frame_capacity: usize,
pub memory_limit: Option<usize>,
}
Expand description
Parameters for memory optimization
Fields§
§buffer_size: usize
Pre allocated unparsed buffer size. Should correspond to the maximum expected response size.
frame_capacity: usize
Pre allocated count of parsed frames. Should correspond to the expected number of parallel futures/commands.
memory_limit: Option<usize>
Optional buffer memory limit in bytes for preventing DOS attacks. CommandErrors::MemoryFull error is returned in case limit is reached.
Trait Implementations§
Source§impl Clone for MemoryParameters
impl Clone for MemoryParameters
Source§fn clone(&self) -> MemoryParameters
fn clone(&self) -> MemoryParameters
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 MemoryParameters
impl Debug for MemoryParameters
Auto Trait Implementations§
impl Freeze for MemoryParameters
impl RefUnwindSafe for MemoryParameters
impl Send for MemoryParameters
impl Sync for MemoryParameters
impl Unpin for MemoryParameters
impl UnwindSafe for MemoryParameters
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