Enum SizeConfig
pub enum SizeConfig {
Default,
Ratio(f64),
Fixed(usize),
}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§
§impl SizeConfig
impl SizeConfig
Trait Implementations§
§impl Clone for SizeConfig
impl Clone for SizeConfig
§fn clone(&self) -> SizeConfig
fn clone(&self) -> SizeConfig
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 more§impl Debug for SizeConfig
impl Debug for SizeConfig
§impl Default for SizeConfig
impl Default for SizeConfig
§fn default() -> SizeConfig
fn default() -> SizeConfig
Returns the “default value” for a type. Read more
§impl From<f64> for SizeConfig
impl From<f64> for SizeConfig
§fn from(ratio: f64) -> SizeConfig
fn from(ratio: f64) -> SizeConfig
Converts to this type from the input type.
§impl From<usize> for SizeConfig
impl From<usize> for SizeConfig
§fn from(size: usize) -> SizeConfig
fn from(size: usize) -> SizeConfig
Converts to this type from the input type.
§impl PartialEq for SizeConfig
impl PartialEq for SizeConfig
impl Copy 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 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
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