pub struct SimpleRange { /* private fields */ }Expand description
A range is a pair of min and max values.
Implementations§
Source§impl SimpleRange
impl SimpleRange
Sourcepub fn new(min: usize, max: usize, mode: RangeMode) -> Result<Self, BadRange>
pub fn new(min: usize, max: usize, mode: RangeMode) -> Result<Self, BadRange>
Constructs a new SimpleRange.
Sourcepub fn new_inclusive(min: usize, max: usize) -> Result<Self, BadRange>
pub fn new_inclusive(min: usize, max: usize) -> Result<Self, BadRange>
Constructs a new Range where both min and max are part of the
range.
Sourcepub fn new_exclusive(min: usize, max: usize) -> Result<Self, BadRange>
pub fn new_exclusive(min: usize, max: usize) -> Result<Self, BadRange>
Constructs a new Range where neither min nor max are part of
the range.
Trait Implementations§
Source§impl Clone for SimpleRange
impl Clone for SimpleRange
Source§fn clone(&self) -> SimpleRange
fn clone(&self) -> SimpleRange
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 moreSource§impl Debug for SimpleRange
impl Debug for SimpleRange
Source§impl Range for SimpleRange
impl Range for SimpleRange
impl Copy for SimpleRange
Auto Trait Implementations§
impl Freeze for SimpleRange
impl RefUnwindSafe for SimpleRange
impl Send for SimpleRange
impl Sync for SimpleRange
impl Unpin for SimpleRange
impl UnwindSafe for SimpleRange
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