pub struct CopyRangeInclusive<Idx> {
pub start: Idx,
pub end: Idx,
}
Expand description
A range bounded inclusively above and below. See
core::ops::RangeInclusive
.
Unlike RangeInclusive
, this struct is Copy
if Idx
is Copy
, and
implements IntoIterator
instead of Interator
.
Fields§
§start: Idx
§end: Idx
Implementations§
Source§impl<Idx> CopyRangeInclusive<Idx>
impl<Idx> CopyRangeInclusive<Idx>
Sourcepub fn is_empty(&self) -> boolwhere
Idx: PartialOrd,
pub fn is_empty(&self) -> boolwhere
Idx: PartialOrd,
Returns true
if the range contains no items.
Sourcepub fn from_std(range: RangeInclusive<Idx>) -> Self
pub fn from_std(range: RangeInclusive<Idx>) -> Self
Convert a RangeInclusive
into a CopyRangeInclusive
.
Note: the value returned by this conversion is unspecified after the
RangeInclusive
has been iterated to exhaustion.
Sourcepub fn into_std(self) -> RangeInclusive<Idx>
pub fn into_std(self) -> RangeInclusive<Idx>
Convert a CopyRangeInclusive
into a RangeInclusive
.
Trait Implementations§
Source§impl<Idx: Clone> Clone for CopyRangeInclusive<Idx>
impl<Idx: Clone> Clone for CopyRangeInclusive<Idx>
Source§fn clone(&self) -> CopyRangeInclusive<Idx>
fn clone(&self) -> CopyRangeInclusive<Idx>
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<Idx: Debug> Debug for CopyRangeInclusive<Idx>
impl<Idx: Debug> Debug for CopyRangeInclusive<Idx>
Source§impl<Idx> From<CopyRangeInclusive<Idx>> for RangeInclusive<Idx>
Convert a CopyRangeInclusive
into a RangeInclusive
.
impl<Idx> From<CopyRangeInclusive<Idx>> for RangeInclusive<Idx>
Convert a CopyRangeInclusive
into a RangeInclusive
.
Source§fn from(value: CopyRangeInclusive<Idx>) -> Self
fn from(value: CopyRangeInclusive<Idx>) -> Self
Converts to this type from the input type.
Source§impl<Idx> From<RangeInclusive<Idx>> for CopyRangeInclusive<Idx>
Convert a RangeInclusive
into a CopyRangeInclusive
.
impl<Idx> From<RangeInclusive<Idx>> for CopyRangeInclusive<Idx>
Convert a RangeInclusive
into a CopyRangeInclusive
.
Note: the value returned by this conversion is unspecified after the
RangeInclusive
has been iterated to exhaustion.
Source§fn from(range: RangeInclusive<Idx>) -> Self
fn from(range: RangeInclusive<Idx>) -> Self
Converts to this type from the input type.
Source§impl<Idx: Hash> Hash for CopyRangeInclusive<Idx>
impl<Idx: Hash> Hash for CopyRangeInclusive<Idx>
Source§impl<Idx> IntoIterator for CopyRangeInclusive<Idx>where
RangeInclusive<Idx>: Iterator<Item = Idx>,
impl<Idx> IntoIterator for CopyRangeInclusive<Idx>where
RangeInclusive<Idx>: Iterator<Item = Idx>,
Source§impl<Idx: PartialEq> PartialEq for CopyRangeInclusive<Idx>
impl<Idx: PartialEq> PartialEq for CopyRangeInclusive<Idx>
Source§impl<Idx> RangeBounds<Idx> for CopyRangeInclusive<&Idx>
impl<Idx> RangeBounds<Idx> for CopyRangeInclusive<&Idx>
Source§impl<Idx> RangeBounds<Idx> for CopyRangeInclusive<Idx>
impl<Idx> RangeBounds<Idx> for CopyRangeInclusive<Idx>
impl<Idx: Copy> Copy for CopyRangeInclusive<Idx>
impl<Idx: Eq> Eq for CopyRangeInclusive<Idx>
impl<Idx> StructuralPartialEq for CopyRangeInclusive<Idx>
Auto Trait Implementations§
impl<Idx> Freeze for CopyRangeInclusive<Idx>where
Idx: Freeze,
impl<Idx> RefUnwindSafe for CopyRangeInclusive<Idx>where
Idx: RefUnwindSafe,
impl<Idx> Send for CopyRangeInclusive<Idx>where
Idx: Send,
impl<Idx> Sync for CopyRangeInclusive<Idx>where
Idx: Sync,
impl<Idx> Unpin for CopyRangeInclusive<Idx>where
Idx: Unpin,
impl<Idx> UnwindSafe for CopyRangeInclusive<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