Skip to main content

RangeRelation

Enum RangeRelation 

Source
pub enum RangeRelation<T> {
    Before(T),
    Overlap(T),
    After(T),
    Last(T),
    Invalid(T),
}
Expand description

This enum is used to represent positional relationships between 2 ranges.

The additional states, represent the initialization of the set.

Variants§

§

Before(T)

Range a is before range b

§

Overlap(T)

Range a and b overlap

§

After(T)

Range a is after range b

§

Last(T)

Represents final set of data

§

Invalid(T)

Denotes a was not valid

Implementations§

Source§

impl<T> RangeRelation<T>

Source

pub fn unwrap(self) -> T

Unwraps the Value.

Source

pub fn invalid(self) -> T

Unwraps the state of RangeRelation::Invalid or panics!.

Source

pub fn last(self) -> T

Unwraps the state of RangeRelation::Last or panics!

Source

pub fn before(self) -> T

Unwraps the state of RangeRelation::Before or panics!

Source

pub fn overlap(self) -> T

Unwraps the state of RangeRelation::Overlap or panics!

Source

pub fn after(self) -> T

Unwraps the state of RangeRelation::After or panics!

Source

pub fn is_last(&self) -> bool

Returns true if RangeRelation::Last.

Source

pub fn is_invalid(&self) -> bool

Returns true if RangeRelation::Invalid.

Source

pub fn is_overlap(&self) -> bool

Returns true if RangeRelation::Overlap.

Source

pub fn is_before(&self) -> bool

Returns true if RangeRelation::Before.

Source

pub fn is_after(&self) -> bool

Returns true if RangeRelation::After.

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

§

impl<T> UnsafeUnpin for RangeRelation<T>
where T: UnsafeUnpin,

§

impl<T> UnwindSafe for RangeRelation<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> 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, 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.