RangeFromExclusive

Struct RangeFromExclusive 

Source
pub struct RangeFromExclusive<T> {
    pub start: T,
}
Expand description

A range only bounded exclusively below.

The RangeFromExclusive contains all values with x > start.

Note: Overflow in the Iterator implementation (when the contained data type reaches its numerical limit) is allowed to panic, wrap, or saturate. This behavior is defined by the implementation of the Step trait. For primitive integers, this follows the normal rules, and respects the overflow checks profile (panic in debug, wrap in release).

§Example

RangeFromExclusives can be created directly, as follows:

use more_ranges::RangeFromExclusive;

let range = RangeFromExclusive {
    start: 1,
};

Fields§

§start: T

The lower bound of the range (exclusive).

Trait Implementations§

Source§

impl<T: Clone> Clone for RangeFromExclusive<T>

Source§

fn clone(&self) -> RangeFromExclusive<T>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug> Debug for RangeFromExclusive<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de, T> Deserialize<'de> for RangeFromExclusive<T>
where T: Deserialize<'de>,

Available on crate feature serde only.
Source§

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<T: Hash> Hash for RangeFromExclusive<T>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<T> Index<RangeFromExclusive<usize>> for [T]

Source§

type Output = <[T] as Index<RangeFrom<usize>>>::Output

The returned type after indexing.
Source§

fn index(&self, index: RangeFromExclusive<usize>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<RangeFromExclusive<usize>> for CStr

Source§

type Output = <CStr as Index<RangeFrom<usize>>>::Output

The returned type after indexing.
Source§

fn index(&self, index: RangeFromExclusive<usize>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<RangeFromExclusive<usize>> for String

Available on crate feature alloc only.
Source§

type Output = <String as Index<RangeFrom<usize>>>::Output

The returned type after indexing.
Source§

fn index(&self, index: RangeFromExclusive<usize>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<T> Index<RangeFromExclusive<usize>> for Vec<T>

Available on crate feature alloc only.
Source§

type Output = <Vec<T> as Index<RangeFrom<usize>>>::Output

The returned type after indexing.
Source§

fn index(&self, index: RangeFromExclusive<usize>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<RangeFromExclusive<usize>> for str

Source§

type Output = <str as Index<RangeFrom<usize>>>::Output

The returned type after indexing.
Source§

fn index(&self, index: RangeFromExclusive<usize>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<T> IndexMut<RangeFromExclusive<usize>> for [T]

Source§

fn index_mut(&mut self, index: RangeFromExclusive<usize>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<RangeFromExclusive<usize>> for String

Available on crate feature alloc only.
Source§

fn index_mut(&mut self, index: RangeFromExclusive<usize>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<T> IndexMut<RangeFromExclusive<usize>> for Vec<T>

Available on crate feature alloc only.
Source§

fn index_mut(&mut self, index: RangeFromExclusive<usize>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<RangeFromExclusive<usize>> for str

Source§

fn index_mut(&mut self, index: RangeFromExclusive<usize>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<T> IntoIterator for RangeFromExclusive<T>
where RangeFrom<T>: Iterator<Item = T>,

Source§

type IntoIter = IterRangeFromExclusive<T>

Which kind of iterator are we turning this into?
Source§

type Item = T

The type of the elements being iterated over.
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<T: PartialEq> PartialEq for RangeFromExclusive<T>

Source§

fn eq(&self, other: &RangeFromExclusive<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a, T> RangeBounds<T> for RangeFromExclusive<&'a T>

Source§

fn start_bound(&self) -> Bound<&T>

Start index bound. Read more
Source§

fn end_bound(&self) -> Bound<&T>

End index bound. Read more
1.35.0 · Source§

fn contains<U>(&self, item: &U) -> bool
where T: PartialOrd<U>, U: PartialOrd<T> + ?Sized,

Returns true if item is contained in the range. Read more
Source§

fn is_empty(&self) -> bool
where T: PartialOrd,

🔬This is a nightly-only experimental API. (range_bounds_is_empty)
Returns true if the range contains no items. One-sided ranges (RangeFrom, etc) always return false. Read more
Source§

impl<T> RangeBounds<T> for RangeFromExclusive<T>

Source§

fn start_bound(&self) -> Bound<&T>

Start index bound. Read more
Source§

fn end_bound(&self) -> Bound<&T>

End index bound. Read more
1.35.0 · Source§

fn contains<U>(&self, item: &U) -> bool
where T: PartialOrd<U>, U: PartialOrd<T> + ?Sized,

Returns true if item is contained in the range. Read more
Source§

fn is_empty(&self) -> bool
where T: PartialOrd,

🔬This is a nightly-only experimental API. (range_bounds_is_empty)
Returns true if the range contains no items. One-sided ranges (RangeFrom, etc) always return false. Read more
Source§

impl<T> Serialize for RangeFromExclusive<T>
where T: Serialize,

Available on crate feature serde only.
Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<T: Copy> Copy for RangeFromExclusive<T>

Source§

impl<T: Eq> Eq for RangeFromExclusive<T>

Source§

impl<T> StructuralPartialEq for RangeFromExclusive<T>

Auto Trait Implementations§

§

impl<T> Freeze for RangeFromExclusive<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for RangeFromExclusive<T>
where T: RefUnwindSafe,

§

impl<T> Send for RangeFromExclusive<T>
where T: Send,

§

impl<T> Sync for RangeFromExclusive<T>
where T: Sync,

§

impl<T> Unpin for RangeFromExclusive<T>
where T: Unpin,

§

impl<T> UnwindSafe for RangeFromExclusive<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,