pub enum SizeConfig {
Default,
Ratio(f64),
Fixed(usize),
}Available on crate features
dataset and std only.Expand description
Helper option to describe the size of a wrapper, relative to a wrapped object.
Variants§
Default
Use the size of the source dataset.
Ratio(f64)
Use the size as a ratio of the source dataset size.
Must be >= 0.
Fixed(usize)
Use a fixed size.
Implementations§
Source§impl SizeConfig
impl SizeConfig
Trait Implementations§
Source§impl Clone for SizeConfig
impl Clone for SizeConfig
Source§fn clone(&self) -> SizeConfig
fn clone(&self) -> SizeConfig
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 moreimpl Copy for SizeConfig
Source§impl Debug for SizeConfig
impl Debug for SizeConfig
Source§impl Default for SizeConfig
impl Default for SizeConfig
Source§fn default() -> SizeConfig
fn default() -> SizeConfig
Returns the “default value” for a type. Read more
Source§impl From<f64> for SizeConfig
impl From<f64> for SizeConfig
Source§fn from(ratio: f64) -> SizeConfig
fn from(ratio: f64) -> SizeConfig
Converts to this type from the input type.
Source§impl From<usize> for SizeConfig
impl From<usize> for SizeConfig
Source§fn from(size: usize) -> SizeConfig
fn from(size: usize) -> SizeConfig
Converts to this type from the input type.
Source§impl PartialEq for SizeConfig
impl PartialEq for SizeConfig
impl StructuralPartialEq for SizeConfig
Auto Trait Implementations§
impl Freeze for SizeConfig
impl RefUnwindSafe for SizeConfig
impl Send for SizeConfig
impl Sync for SizeConfig
impl Unpin for SizeConfig
impl UnsafeUnpin for SizeConfig
impl UnwindSafe for SizeConfig
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