RangeFromExclusiveToExclusive

Struct RangeFromExclusiveToExclusive 

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

A range bounded exclusively below and above.

The RangeFromExclusiveToExclusive contains all values with x > start and x < end. It is empty unless start < end + 1`.

§Example

RangeFromExclusiveToExclusives can be created directly, as follows:

use more_ranges::RangeFromExclusiveToExclusive;

let range = RangeFromExclusiveToExclusive {
    start: 1,
    end: 4,
};

Fields§

§start: T

The lower bound of the range (exclusive).

§end: T

The upper bound of the range (exclusive).

Trait Implementations§

Source§

impl<T: Clone> Clone for RangeFromExclusiveToExclusive<T>

Source§

fn clone(&self) -> RangeFromExclusiveToExclusive<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 RangeFromExclusiveToExclusive<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 RangeFromExclusiveToExclusive<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 RangeFromExclusiveToExclusive<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<RangeFromExclusiveToExclusive<usize>> for [T]

Source§

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

The returned type after indexing.
Source§

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

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

impl Index<RangeFromExclusiveToExclusive<usize>> for String

Available on crate feature alloc only.
Source§

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

The returned type after indexing.
Source§

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

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

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

Available on crate feature alloc only.
Source§

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

The returned type after indexing.
Source§

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

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

impl Index<RangeFromExclusiveToExclusive<usize>> for str

Source§

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

The returned type after indexing.
Source§

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

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

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

Source§

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

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

impl IndexMut<RangeFromExclusiveToExclusive<usize>> for String

Available on crate feature alloc only.
Source§

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

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

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

Available on crate feature alloc only.
Source§

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

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

impl IndexMut<RangeFromExclusiveToExclusive<usize>> for str

Source§

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

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

impl<T> IntoIterator for RangeFromExclusiveToExclusive<T>
where Range<T>: Iterator<Item = T>,

Source§

type IntoIter = IterRangeFromExclusiveToExclusive<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 RangeFromExclusiveToExclusive<T>

Source§

fn eq(&self, other: &RangeFromExclusiveToExclusive<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 RangeFromExclusiveToExclusive<&'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 RangeFromExclusiveToExclusive<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 RangeFromExclusiveToExclusive<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 RangeFromExclusiveToExclusive<T>

Source§

impl<T: Eq> Eq for RangeFromExclusiveToExclusive<T>

Source§

impl<T> StructuralPartialEq for RangeFromExclusiveToExclusive<T>

Auto Trait Implementations§

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>,