Enum Scale
pub enum Scale {
Linear,
Log,
}Expand description
Whether a numeric range is walked linearly or logarithmically.
This is the ergonomic front end of the log flag on
Distribution::Float and Distribution::Int; the suggest API takes a
Scale so that call sites read as
suggest_f64("lr", 1e-5..=1e-2, Scale::Log).
Variants§
Linear
Uniform in the value itself.
Log
Uniform in the logarithm of the value; requires a strictly positive lower bound.
Implementations§
Trait Implementations§
impl Copy for Scale
§impl<'de> Deserialize<'de> for Scale
impl<'de> Deserialize<'de> for Scale
§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Scale
§impl Ord for Scale
impl Ord for Scale
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
§impl PartialOrd for Scale
impl PartialOrd for Scale
impl StructuralPartialEq for Scale
Auto Trait Implementations§
impl Freeze for Scale
impl RefUnwindSafe for Scale
impl Send for Scale
impl Sync for Scale
impl Unpin for Scale
impl UnsafeUnpin for Scale
impl UnwindSafe for Scale
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