pub struct RangeLimit {
pub min: u32,
pub max: u32,
}Expand description
Input range for RandomInRange, inclusive. Result will be >= min and <= max Example: random_in_range(RangeLimit{0,4}) returns one the values, 0, 1, 2, 3, or 4.
Fields§
§min: u32§max: u32Trait Implementations§
source§impl Clone for RangeLimit
impl Clone for RangeLimit
source§fn clone(&self) -> RangeLimit
fn clone(&self) -> RangeLimit
Returns a copy 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 RangeLimit
impl Debug for RangeLimit
source§impl Default for RangeLimit
impl Default for RangeLimit
source§fn default() -> RangeLimit
fn default() -> RangeLimit
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for RangeLimit
impl<'de> Deserialize<'de> for RangeLimit
source§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
source§impl PartialEq<RangeLimit> for RangeLimit
impl PartialEq<RangeLimit> for RangeLimit
source§fn eq(&self, other: &RangeLimit) -> bool
fn eq(&self, other: &RangeLimit) -> bool
This method tests for
self and other values to be equal, and is used
by ==.