pub struct CopyRange<Idx> {
pub start: Idx,
pub end: Idx,
}Expand description
A (half-open) range bounded inclusively below and exclusively above. See
core::ops::Range.
Unlike Range, this struct is Copy if Idx is Copy, and implements
IntoIterator instead of Interator.
Fields§
§start: Idx§end: IdxImplementations§
Source§impl<Idx> CopyRange<Idx>
impl<Idx> CopyRange<Idx>
Sourcepub fn contains<U>(&self, item: &U) -> bool
pub fn contains<U>(&self, item: &U) -> bool
Returns true if item is contained in the range.
See Range::contains.
Sourcepub fn is_empty(&self) -> boolwhere
Idx: PartialOrd,
pub fn is_empty(&self) -> boolwhere
Idx: PartialOrd,
Returns true if the range contains no items.
See Range::contains.
Trait Implementations§
Source§impl<Idx> IntoIterator for CopyRange<Idx>
impl<Idx> IntoIterator for CopyRange<Idx>
Source§impl<Idx> RangeBounds<Idx> for CopyRange<&Idx>
impl<Idx> RangeBounds<Idx> for CopyRange<&Idx>
Source§impl<Idx> RangeBounds<Idx> for CopyRange<Idx>
impl<Idx> RangeBounds<Idx> for CopyRange<Idx>
impl<Idx: Copy> Copy for CopyRange<Idx>
impl<Idx: Eq> Eq for CopyRange<Idx>
impl<Idx> StructuralPartialEq for CopyRange<Idx>
Auto Trait Implementations§
impl<Idx> Freeze for CopyRange<Idx>where
Idx: Freeze,
impl<Idx> RefUnwindSafe for CopyRange<Idx>where
Idx: RefUnwindSafe,
impl<Idx> Send for CopyRange<Idx>where
Idx: Send,
impl<Idx> Sync for CopyRange<Idx>where
Idx: Sync,
impl<Idx> Unpin for CopyRange<Idx>where
Idx: Unpin,
impl<Idx> UnwindSafe for CopyRange<Idx>where
Idx: UnwindSafe,
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