pub struct AllocThresholdsBuilder {
current: Option<Threshold<usize>>,
peak: Option<Threshold<usize>>,
total_size: Option<Threshold<usize>>,
total_num: Option<Threshold<usize>>,
reallocs: Option<Threshold<usize>>,
}Expand description
Builder for AllocThresholds.
Fields§
§current: Option<Threshold<usize>>§peak: Option<Threshold<usize>>§total_size: Option<Threshold<usize>>§total_num: Option<Threshold<usize>>§reallocs: Option<Threshold<usize>>Implementations§
Source§impl AllocThresholdsBuilder
impl AllocThresholdsBuilder
pub fn current(&mut self, value: Threshold<usize>) -> &mut Self
pub fn peak(&mut self, value: Threshold<usize>) -> &mut Self
pub fn total_size(&mut self, value: Threshold<usize>) -> &mut Self
pub fn total_num(&mut self, value: Threshold<usize>) -> &mut Self
pub fn reallocs(&mut self, value: Threshold<usize>) -> &mut Self
Sourcepub fn build(&self) -> Result<AllocThresholds, AllocThresholdsBuilderError>
pub fn build(&self) -> Result<AllocThresholds, AllocThresholdsBuilderError>
Sourcefn create_empty() -> Self
fn create_empty() -> Self
Create an empty builder, with all fields set to None or PhantomData.
Trait Implementations§
Source§impl Clone for AllocThresholdsBuilder
impl Clone for AllocThresholdsBuilder
Source§fn clone(&self) -> AllocThresholdsBuilder
fn clone(&self) -> AllocThresholdsBuilder
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 moreAuto Trait Implementations§
impl Freeze for AllocThresholdsBuilder
impl RefUnwindSafe for AllocThresholdsBuilder
impl Send for AllocThresholdsBuilder
impl Sync for AllocThresholdsBuilder
impl Unpin for AllocThresholdsBuilder
impl UnwindSafe for AllocThresholdsBuilder
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