pub struct IndexBounds {
pub start: Option<usize>,
pub end: Option<usize>,
}
Expand description
Defines which number of arguments is valid.
Convertible from an exact value a
as well as inclusive range expressions a..
, ..=b
, a..=b
.
Fields§
§start: Option<usize>
The lower (inclusive) bound of the expected number of arguments, or None
if unbounded.
end: Option<usize>
The upper (inclusive) bound of the expected number of arguments, or None
if unbounded.
Implementations§
Trait Implementations§
Source§impl Debug for IndexBounds
impl Debug for IndexBounds
Source§impl Display for IndexBounds
impl Display for IndexBounds
Source§impl From<RangeInclusive<usize>> for IndexBounds
a..=b
impl From<RangeInclusive<usize>> for IndexBounds
a..=b
Source§fn from(range: RangeInclusive<usize>) -> Self
fn from(range: RangeInclusive<usize>) -> Self
Converts to this type from the input type.
Source§impl From<RangeToInclusive<usize>> for IndexBounds
..=b
impl From<RangeToInclusive<usize>> for IndexBounds
..=b
Source§fn from(range: RangeToInclusive<usize>) -> Self
fn from(range: RangeToInclusive<usize>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for IndexBounds
impl RefUnwindSafe for IndexBounds
impl Send for IndexBounds
impl Sync for IndexBounds
impl Unpin for IndexBounds
impl UnwindSafe for IndexBounds
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