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: u32
Trait 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 for RangeLimit
impl PartialEq for RangeLimit
Source§impl Serialize for RangeLimit
impl Serialize for RangeLimit
impl Eq for RangeLimit
impl StructuralPartialEq for RangeLimit
Auto Trait Implementations§
impl Freeze for RangeLimit
impl RefUnwindSafe for RangeLimit
impl Send for RangeLimit
impl Sync for RangeLimit
impl Unpin for RangeLimit
impl UnwindSafe for RangeLimit
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.