Skip to main content

NonEmpty

Struct NonEmpty 

Source
pub struct NonEmpty<T>(/* private fields */);
Expand description

An interval that is known not to be empty.

§Layout

NonEmpty<T> is guaranteed to have the same layout and bit validity as T with the exception that non-empty instances are valid.

Implementations§

Source§

impl<T> NonEmpty<T>

Source

pub unsafe fn new_unchecked(value: T) -> Self

Creates a non-empty without checking whether the value is non-empty. This results in undefined behavior if the value is empty.

§Safety

The value must not be empty.

Trait Implementations§

Source§

impl<T: Clone> Clone for NonEmpty<T>

Source§

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

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<T> Contains<NonEmpty<Interval<T>>> for NonEmpty<Interval<T>>
where T: PartialOrd,

Source§

fn contains(&self, other: &NonEmpty<Interval<T>>) -> bool

Returns true iff self contains `other.0. Read more
Source§

fn is_contained_by(&self, other: &T) -> bool
where T: Contains<Self>,

Returns true iff self is contained by `other.0. Read more
Source§

impl<T> Contains<NonEmpty<Interval<T>>> for NonEmpty<IntervalFrom<T>>
where T: PartialOrd,

Source§

fn contains(&self, other: &NonEmpty<Interval<T>>) -> bool

Returns true iff self contains `other.0. Read more
Source§

fn is_contained_by(&self, other: &T) -> bool
where T: Contains<Self>,

Returns true iff self is contained by `other.0. Read more
Source§

impl<T> Contains<NonEmpty<Interval<T>>> for NonEmpty<IntervalFull>

Source§

fn contains(&self, _other: &NonEmpty<Interval<T>>) -> bool

Returns true iff self contains `other.0. Read more
Source§

fn is_contained_by(&self, other: &T) -> bool
where T: Contains<Self>,

Returns true iff self is contained by `other.0. Read more
Source§

impl<T> Contains<NonEmpty<Interval<T>>> for NonEmpty<IntervalTo<T>>
where T: PartialOrd,

Source§

fn contains(&self, other: &NonEmpty<Interval<T>>) -> bool

Returns true iff self contains `other.0. Read more
Source§

fn is_contained_by(&self, other: &T) -> bool
where T: Contains<Self>,

Returns true iff self is contained by `other.0. Read more
Source§

impl<T> Contains<NonEmpty<IntervalFrom<T>>> for NonEmpty<Interval<T>>

Source§

fn contains(&self, _other: &T) -> bool

Returns true iff self contains `other.0. Read more
Source§

fn is_contained_by(&self, other: &T) -> bool
where T: Contains<Self>,

Returns true iff self is contained by `other.0. Read more
Source§

impl<T> Contains<NonEmpty<IntervalFrom<T>>> for NonEmpty<IntervalFrom<T>>

Source§

fn contains(&self, _other: &T) -> bool

Returns true iff self contains `other.0. Read more
Source§

fn is_contained_by(&self, other: &T) -> bool
where T: Contains<Self>,

Returns true iff self is contained by `other.0. Read more
Source§

impl<T> Contains<NonEmpty<IntervalFrom<T>>> for NonEmpty<IntervalFull>

Source§

fn contains(&self, _other: &T) -> bool

Returns true iff self contains `other.0. Read more
Source§

fn is_contained_by(&self, other: &T) -> bool
where T: Contains<Self>,

Returns true iff self is contained by `other.0. Read more
Source§

impl<T> Contains<NonEmpty<IntervalFrom<T>>> for NonEmpty<IntervalTo<T>>

Source§

fn contains(&self, _other: &T) -> bool

Returns true iff self contains `other.0. Read more
Source§

fn is_contained_by(&self, other: &T) -> bool
where T: Contains<Self>,

Returns true iff self is contained by `other.0. Read more
Source§

impl<T> Contains<NonEmpty<IntervalFull>> for NonEmpty<Interval<T>>

Source§

fn contains(&self, _other: &T) -> bool

Returns true iff self contains `other.0. Read more
Source§

fn is_contained_by(&self, other: &T) -> bool
where T: Contains<Self>,

Returns true iff self is contained by `other.0. Read more
Source§

impl<T> Contains<NonEmpty<IntervalFull>> for NonEmpty<IntervalFrom<T>>

Source§

fn contains(&self, _other: &T) -> bool

Returns true iff self contains `other.0. Read more
Source§

fn is_contained_by(&self, other: &T) -> bool
where T: Contains<Self>,

Returns true iff self is contained by `other.0. Read more
Source§

impl Contains<NonEmpty<IntervalFull>> for NonEmpty<IntervalFull>

Source§

fn contains(&self, _other: &T) -> bool

Returns true iff self contains `other.0. Read more
Source§

fn is_contained_by(&self, other: &T) -> bool
where T: Contains<Self>,

Returns true iff self is contained by `other.0. Read more
Source§

impl<T> Contains<NonEmpty<IntervalFull>> for NonEmpty<IntervalTo<T>>

Source§

fn contains(&self, _other: &T) -> bool

Returns true iff self contains `other.0. Read more
Source§

fn is_contained_by(&self, other: &T) -> bool
where T: Contains<Self>,

Returns true iff self is contained by `other.0. Read more
Source§

impl<T> Contains<NonEmpty<IntervalTo<T>>> for NonEmpty<Interval<T>>

Source§

fn contains(&self, _other: &T) -> bool

Returns true iff self contains `other.0. Read more
Source§

fn is_contained_by(&self, other: &T) -> bool
where T: Contains<Self>,

Returns true iff self is contained by `other.0. Read more
Source§

impl<T> Contains<NonEmpty<IntervalTo<T>>> for NonEmpty<IntervalFrom<T>>

Source§

fn contains(&self, _other: &T) -> bool

Returns true iff self contains `other.0. Read more
Source§

fn is_contained_by(&self, other: &T) -> bool
where T: Contains<Self>,

Returns true iff self is contained by `other.0. Read more
Source§

impl<T> Contains<NonEmpty<IntervalTo<T>>> for NonEmpty<IntervalFull>

Source§

fn contains(&self, _other: &T) -> bool

Returns true iff self contains `other.0. Read more
Source§

fn is_contained_by(&self, other: &T) -> bool
where T: Contains<Self>,

Returns true iff self is contained by `other.0. Read more
Source§

impl<T> Contains<NonEmpty<IntervalTo<T>>> for NonEmpty<IntervalTo<T>>

Source§

fn contains(&self, _other: &T) -> bool

Returns true iff self contains `other.0. Read more
Source§

fn is_contained_by(&self, other: &T) -> bool
where T: Contains<Self>,

Returns true iff self is contained by `other.0. Read more
Source§

impl<T: Copy> Copy for NonEmpty<T>

Source§

impl<T: Debug> Debug for NonEmpty<T>

Source§

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

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

impl<T: Eq> Eq for NonEmpty<T>

Source§

impl<T> Equals<NonEmpty<Interval<T>>> for NonEmpty<Interval<T>>
where T: PartialOrd,

Source§

fn equals(&self, other: &NonEmpty<Interval<T>>) -> bool

Returns true iff self equals `other.0. Read more
Source§

impl<T> Equals<NonEmpty<Interval<T>>> for NonEmpty<IntervalFrom<T>>
where T: PartialOrd,

Source§

fn equals(&self, other: &NonEmpty<Interval<T>>) -> bool

Returns true iff self equals `other.0. Read more
Source§

impl<T> Equals<NonEmpty<Interval<T>>> for NonEmpty<IntervalFull>

Source§

fn equals(&self, _other: &T) -> bool

Returns true iff self equals `other.0. Read more
Source§

impl<T> Equals<NonEmpty<Interval<T>>> for NonEmpty<IntervalTo<T>>

Source§

fn equals(&self, _other: &T) -> bool

Returns true iff self equals `other.0. Read more
Source§

impl<T> Equals<NonEmpty<IntervalFrom<T>>> for NonEmpty<Interval<T>>

Source§

fn equals(&self, _other: &T) -> bool

Returns true iff self equals `other.0. Read more
Source§

impl<T> Equals<NonEmpty<IntervalFrom<T>>> for NonEmpty<IntervalFrom<T>>
where T: PartialOrd,

Source§

fn equals(&self, other: &NonEmpty<IntervalFrom<T>>) -> bool

Returns true iff self equals `other.0. Read more
Source§

impl<T> Equals<NonEmpty<IntervalFrom<T>>> for NonEmpty<IntervalFull>

Source§

fn equals(&self, _other: &T) -> bool

Returns true iff self equals `other.0. Read more
Source§

impl<T> Equals<NonEmpty<IntervalFrom<T>>> for NonEmpty<IntervalTo<T>>

Source§

fn equals(&self, _other: &T) -> bool

Returns true iff self equals `other.0. Read more
Source§

impl<T> Equals<NonEmpty<IntervalFull>> for NonEmpty<Interval<T>>

Source§

fn equals(&self, _other: &T) -> bool

Returns true iff self equals `other.0. Read more
Source§

impl<T> Equals<NonEmpty<IntervalFull>> for NonEmpty<IntervalFrom<T>>

Source§

fn equals(&self, _other: &T) -> bool

Returns true iff self equals `other.0. Read more
Source§

impl Equals<NonEmpty<IntervalFull>> for NonEmpty<IntervalFull>

Source§

fn equals(&self, _other: &NonEmpty<IntervalFull>) -> bool

Returns true iff self equals `other.0. Read more
Source§

impl<T> Equals<NonEmpty<IntervalFull>> for NonEmpty<IntervalTo<T>>

Source§

fn equals(&self, _other: &T) -> bool

Returns true iff self equals `other.0. Read more
Source§

impl<T> Equals<NonEmpty<IntervalTo<T>>> for NonEmpty<Interval<T>>

Source§

fn equals(&self, _other: &T) -> bool

Returns true iff self equals `other.0. Read more
Source§

impl<T> Equals<NonEmpty<IntervalTo<T>>> for NonEmpty<IntervalFrom<T>>

Source§

fn equals(&self, _other: &T) -> bool

Returns true iff self equals `other.0. Read more
Source§

impl<T> Equals<NonEmpty<IntervalTo<T>>> for NonEmpty<IntervalFull>

Source§

fn equals(&self, _other: &T) -> bool

Returns true iff self equals `other.0. Read more
Source§

impl<T> Equals<NonEmpty<IntervalTo<T>>> for NonEmpty<IntervalTo<T>>
where T: PartialOrd,

Source§

fn equals(&self, other: &NonEmpty<IntervalTo<T>>) -> bool

Returns true iff self equals `other.0. Read more
Source§

impl<T> Finishes<NonEmpty<Interval<T>>> for NonEmpty<Interval<T>>
where T: PartialOrd,

Source§

fn finishes(&self, other: &NonEmpty<Interval<T>>) -> bool

Returns true iff self finishes `other.0. Read more
Source§

fn is_finished_by(&self, other: &T) -> bool
where T: Finishes<Self>,

Returns true iff self is finished by `other.0. Read more
Source§

impl<T> Finishes<NonEmpty<Interval<T>>> for NonEmpty<IntervalFrom<T>>
where T: PartialOrd,

Source§

fn finishes(&self, other: &NonEmpty<Interval<T>>) -> bool

Returns true iff self finishes `other.0. Read more
Source§

fn is_finished_by(&self, other: &T) -> bool
where T: Finishes<Self>,

Returns true iff self is finished by `other.0. Read more
Source§

impl<T> Finishes<NonEmpty<Interval<T>>> for NonEmpty<IntervalFull>

Source§

fn finishes(&self, _other: &T) -> bool

Returns true iff self finishes `other.0. Read more
Source§

fn is_finished_by(&self, other: &T) -> bool
where T: Finishes<Self>,

Returns true iff self is finished by `other.0. Read more
Source§

impl<T> Finishes<NonEmpty<Interval<T>>> for NonEmpty<IntervalTo<T>>

Source§

fn finishes(&self, _other: &T) -> bool

Returns true iff self finishes `other.0. Read more
Source§

fn is_finished_by(&self, other: &T) -> bool
where T: Finishes<Self>,

Returns true iff self is finished by `other.0. Read more
Source§

impl<T> Finishes<NonEmpty<IntervalFrom<T>>> for NonEmpty<Interval<T>>
where T: PartialOrd,

Source§

fn finishes(&self, other: &NonEmpty<IntervalFrom<T>>) -> bool

Returns true iff self finishes `other.0. Read more
Source§

fn is_finished_by(&self, other: &T) -> bool
where T: Finishes<Self>,

Returns true iff self is finished by `other.0. Read more
Source§

impl<T> Finishes<NonEmpty<IntervalFrom<T>>> for NonEmpty<IntervalFrom<T>>
where T: PartialOrd,

Source§

fn finishes(&self, other: &NonEmpty<IntervalFrom<T>>) -> bool

Returns true iff self finishes `other.0. Read more
Source§

fn is_finished_by(&self, other: &T) -> bool
where T: Finishes<Self>,

Returns true iff self is finished by `other.0. Read more
Source§

impl<T> Finishes<NonEmpty<IntervalFrom<T>>> for NonEmpty<IntervalFull>

Source§

fn finishes(&self, _other: &T) -> bool

Returns true iff self finishes `other.0. Read more
Source§

fn is_finished_by(&self, other: &T) -> bool
where T: Finishes<Self>,

Returns true iff self is finished by `other.0. Read more
Source§

impl<T> Finishes<NonEmpty<IntervalFrom<T>>> for NonEmpty<IntervalTo<T>>

Source§

fn finishes(&self, _other: &T) -> bool

Returns true iff self finishes `other.0. Read more
Source§

fn is_finished_by(&self, other: &T) -> bool
where T: Finishes<Self>,

Returns true iff self is finished by `other.0. Read more
Source§

impl<T> Finishes<NonEmpty<IntervalFull>> for NonEmpty<Interval<T>>

Source§

fn finishes(&self, _other: &T) -> bool

Returns true iff self finishes `other.0. Read more
Source§

fn is_finished_by(&self, other: &T) -> bool
where T: Finishes<Self>,

Returns true iff self is finished by `other.0. Read more
Source§

impl<T> Finishes<NonEmpty<IntervalFull>> for NonEmpty<IntervalFrom<T>>

Source§

fn finishes(&self, _other: &NonEmpty<IntervalFull>) -> bool

Returns true iff self finishes `other.0. Read more
Source§

fn is_finished_by(&self, other: &T) -> bool
where T: Finishes<Self>,

Returns true iff self is finished by `other.0. Read more
Source§

impl Finishes<NonEmpty<IntervalFull>> for NonEmpty<IntervalFull>

Source§

fn finishes(&self, _other: &T) -> bool

Returns true iff self finishes `other.0. Read more
Source§

fn is_finished_by(&self, other: &T) -> bool
where T: Finishes<Self>,

Returns true iff self is finished by `other.0. Read more
Source§

impl<T> Finishes<NonEmpty<IntervalFull>> for NonEmpty<IntervalTo<T>>

Source§

fn finishes(&self, _other: &T) -> bool

Returns true iff self finishes `other.0. Read more
Source§

fn is_finished_by(&self, other: &T) -> bool
where T: Finishes<Self>,

Returns true iff self is finished by `other.0. Read more
Source§

impl<T> Finishes<NonEmpty<IntervalTo<T>>> for NonEmpty<Interval<T>>
where T: PartialOrd,

Source§

fn finishes(&self, other: &NonEmpty<IntervalTo<T>>) -> bool

Returns true iff self finishes `other.0. Read more
Source§

fn is_finished_by(&self, other: &T) -> bool
where T: Finishes<Self>,

Returns true iff self is finished by `other.0. Read more
Source§

impl<T> Finishes<NonEmpty<IntervalTo<T>>> for NonEmpty<IntervalFrom<T>>

Source§

fn finishes(&self, _other: &T) -> bool

Returns true iff self finishes `other.0. Read more
Source§

fn is_finished_by(&self, other: &T) -> bool
where T: Finishes<Self>,

Returns true iff self is finished by `other.0. Read more
Source§

impl<T> Finishes<NonEmpty<IntervalTo<T>>> for NonEmpty<IntervalFull>

Source§

fn finishes(&self, _other: &T) -> bool

Returns true iff self finishes `other.0. Read more
Source§

fn is_finished_by(&self, other: &T) -> bool
where T: Finishes<Self>,

Returns true iff self is finished by `other.0. Read more
Source§

impl<T> Finishes<NonEmpty<IntervalTo<T>>> for NonEmpty<IntervalTo<T>>

Source§

fn finishes(&self, _other: &T) -> bool

Returns true iff self finishes `other.0. Read more
Source§

fn is_finished_by(&self, other: &T) -> bool
where T: Finishes<Self>,

Returns true iff self is finished by `other.0. Read more
Source§

impl<T> From<IntervalFrom<T>> for NonEmpty<IntervalFrom<T>>

Source§

fn from(value: IntervalFrom<T>) -> Self

Converts to this type from the input type.
Source§

impl From<IntervalFull> for NonEmpty<IntervalFull>

Source§

fn from(value: IntervalFull) -> Self

Converts to this type from the input type.
Source§

impl<T> From<IntervalTo<T>> for NonEmpty<IntervalTo<T>>

Source§

fn from(value: IntervalTo<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Hash> Hash for NonEmpty<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<I, T> IntervalBounds<T> for NonEmpty<I>
where I: IntervalBounds<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
Source§

fn bounds(&self) -> Bounds<T>

Index bounds. Read more
Source§

impl<T> Meets<NonEmpty<Interval<T>>> for NonEmpty<Interval<T>>
where T: PartialOrd,

Source§

fn meets(&self, other: &NonEmpty<Interval<T>>) -> bool

Returns true iff self meets `other.0. Read more
Source§

fn is_met_by(&self, other: &T) -> bool
where T: Meets<Self>,

Returns true iff self is met by `other.0. Read more
Source§

impl<T> Meets<NonEmpty<Interval<T>>> for NonEmpty<IntervalFrom<T>>

Source§

fn meets(&self, _other: &T) -> bool

Returns true iff self meets `other.0. Read more
Source§

fn is_met_by(&self, other: &T) -> bool
where T: Meets<Self>,

Returns true iff self is met by `other.0. Read more
Source§

impl<T> Meets<NonEmpty<Interval<T>>> for NonEmpty<IntervalFull>

Source§

fn meets(&self, _other: &T) -> bool

Returns true iff self meets `other.0. Read more
Source§

fn is_met_by(&self, other: &T) -> bool
where T: Meets<Self>,

Returns true iff self is met by `other.0. Read more
Source§

impl<T> Meets<NonEmpty<Interval<T>>> for NonEmpty<IntervalTo<T>>
where T: PartialOrd,

Source§

fn meets(&self, other: &NonEmpty<Interval<T>>) -> bool

Returns true iff self meets `other.0. Read more
Source§

fn is_met_by(&self, other: &T) -> bool
where T: Meets<Self>,

Returns true iff self is met by `other.0. Read more
Source§

impl<T> Meets<NonEmpty<IntervalFrom<T>>> for NonEmpty<Interval<T>>
where T: PartialOrd,

Source§

fn meets(&self, other: &NonEmpty<IntervalFrom<T>>) -> bool

Returns true iff self meets `other.0. Read more
Source§

fn is_met_by(&self, other: &T) -> bool
where T: Meets<Self>,

Returns true iff self is met by `other.0. Read more
Source§

impl<T> Meets<NonEmpty<IntervalFrom<T>>> for NonEmpty<IntervalFrom<T>>

Source§

fn meets(&self, _other: &T) -> bool

Returns true iff self meets `other.0. Read more
Source§

fn is_met_by(&self, other: &T) -> bool
where T: Meets<Self>,

Returns true iff self is met by `other.0. Read more
Source§

impl<T> Meets<NonEmpty<IntervalFrom<T>>> for NonEmpty<IntervalFull>

Source§

fn meets(&self, _other: &T) -> bool

Returns true iff self meets `other.0. Read more
Source§

fn is_met_by(&self, other: &T) -> bool
where T: Meets<Self>,

Returns true iff self is met by `other.0. Read more
Source§

impl<T> Meets<NonEmpty<IntervalFrom<T>>> for NonEmpty<IntervalTo<T>>
where T: PartialOrd,

Source§

fn meets(&self, other: &NonEmpty<IntervalFrom<T>>) -> bool

Returns true iff self meets `other.0. Read more
Source§

fn is_met_by(&self, other: &T) -> bool
where T: Meets<Self>,

Returns true iff self is met by `other.0. Read more
Source§

impl<T> Meets<NonEmpty<IntervalFull>> for NonEmpty<Interval<T>>

Source§

fn meets(&self, _other: &T) -> bool

Returns true iff self meets `other.0. Read more
Source§

fn is_met_by(&self, other: &T) -> bool
where T: Meets<Self>,

Returns true iff self is met by `other.0. Read more
Source§

impl<T> Meets<NonEmpty<IntervalFull>> for NonEmpty<IntervalFrom<T>>

Source§

fn meets(&self, _other: &T) -> bool

Returns true iff self meets `other.0. Read more
Source§

fn is_met_by(&self, other: &T) -> bool
where T: Meets<Self>,

Returns true iff self is met by `other.0. Read more
Source§

impl Meets<NonEmpty<IntervalFull>> for NonEmpty<IntervalFull>

Source§

fn meets(&self, _other: &T) -> bool

Returns true iff self meets `other.0. Read more
Source§

fn is_met_by(&self, other: &T) -> bool
where T: Meets<Self>,

Returns true iff self is met by `other.0. Read more
Source§

impl<T> Meets<NonEmpty<IntervalFull>> for NonEmpty<IntervalTo<T>>

Source§

fn meets(&self, _other: &T) -> bool

Returns true iff self meets `other.0. Read more
Source§

fn is_met_by(&self, other: &T) -> bool
where T: Meets<Self>,

Returns true iff self is met by `other.0. Read more
Source§

impl<T> Meets<NonEmpty<IntervalTo<T>>> for NonEmpty<Interval<T>>

Source§

fn meets(&self, _other: &T) -> bool

Returns true iff self meets `other.0. Read more
Source§

fn is_met_by(&self, other: &T) -> bool
where T: Meets<Self>,

Returns true iff self is met by `other.0. Read more
Source§

impl<T> Meets<NonEmpty<IntervalTo<T>>> for NonEmpty<IntervalFrom<T>>

Source§

fn meets(&self, _other: &T) -> bool

Returns true iff self meets `other.0. Read more
Source§

fn is_met_by(&self, other: &T) -> bool
where T: Meets<Self>,

Returns true iff self is met by `other.0. Read more
Source§

impl<T> Meets<NonEmpty<IntervalTo<T>>> for NonEmpty<IntervalFull>

Source§

fn meets(&self, _other: &T) -> bool

Returns true iff self meets `other.0. Read more
Source§

fn is_met_by(&self, other: &T) -> bool
where T: Meets<Self>,

Returns true iff self is met by `other.0. Read more
Source§

impl<T> Meets<NonEmpty<IntervalTo<T>>> for NonEmpty<IntervalTo<T>>

Source§

fn meets(&self, _other: &T) -> bool

Returns true iff self meets `other.0. Read more
Source§

fn is_met_by(&self, other: &T) -> bool
where T: Meets<Self>,

Returns true iff self is met by `other.0. Read more
Source§

impl<T: Ord> Ord for NonEmpty<T>

Source§

fn cmp(&self, other: &NonEmpty<T>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<T> Overlaps<NonEmpty<Interval<T>>> for NonEmpty<Interval<T>>
where T: PartialOrd,

Source§

fn overlaps(&self, other: &NonEmpty<Interval<T>>) -> bool

Returns true iff self overlaps `other.0. Read more
Source§

fn is_overlapped_by(&self, other: &T) -> bool
where T: Overlaps<Self>,

Returns true iff self is overlapped by `other.0. Read more
Source§

impl<T> Overlaps<NonEmpty<Interval<T>>> for NonEmpty<IntervalFrom<T>>

Source§

fn overlaps(&self, _other: &T) -> bool

Returns true iff self overlaps `other.0. Read more
Source§

fn is_overlapped_by(&self, other: &T) -> bool
where T: Overlaps<Self>,

Returns true iff self is overlapped by `other.0. Read more
Source§

impl<T> Overlaps<NonEmpty<Interval<T>>> for NonEmpty<IntervalFull>

Source§

fn overlaps(&self, _other: &T) -> bool

Returns true iff self overlaps `other.0. Read more
Source§

fn is_overlapped_by(&self, other: &T) -> bool
where T: Overlaps<Self>,

Returns true iff self is overlapped by `other.0. Read more
Source§

impl<T> Overlaps<NonEmpty<Interval<T>>> for NonEmpty<IntervalTo<T>>
where T: PartialOrd,

Source§

fn overlaps(&self, other: &NonEmpty<Interval<T>>) -> bool

Returns true iff self overlaps `other.0. Read more
Source§

fn is_overlapped_by(&self, other: &T) -> bool
where T: Overlaps<Self>,

Returns true iff self is overlapped by `other.0. Read more
Source§

impl<T> Overlaps<NonEmpty<IntervalFrom<T>>> for NonEmpty<Interval<T>>
where T: PartialOrd,

Source§

fn overlaps(&self, other: &NonEmpty<IntervalFrom<T>>) -> bool

Returns true iff self overlaps `other.0. Read more
Source§

fn is_overlapped_by(&self, other: &T) -> bool
where T: Overlaps<Self>,

Returns true iff self is overlapped by `other.0. Read more
Source§

impl<T> Overlaps<NonEmpty<IntervalFrom<T>>> for NonEmpty<IntervalFrom<T>>

Source§

fn overlaps(&self, _other: &T) -> bool

Returns true iff self overlaps `other.0. Read more
Source§

fn is_overlapped_by(&self, other: &T) -> bool
where T: Overlaps<Self>,

Returns true iff self is overlapped by `other.0. Read more
Source§

impl<T> Overlaps<NonEmpty<IntervalFrom<T>>> for NonEmpty<IntervalFull>

Source§

fn overlaps(&self, _other: &T) -> bool

Returns true iff self overlaps `other.0. Read more
Source§

fn is_overlapped_by(&self, other: &T) -> bool
where T: Overlaps<Self>,

Returns true iff self is overlapped by `other.0. Read more
Source§

impl<T> Overlaps<NonEmpty<IntervalFrom<T>>> for NonEmpty<IntervalTo<T>>
where T: PartialOrd,

Source§

fn overlaps(&self, other: &NonEmpty<IntervalFrom<T>>) -> bool

Returns true iff self overlaps `other.0. Read more
Source§

fn is_overlapped_by(&self, other: &T) -> bool
where T: Overlaps<Self>,

Returns true iff self is overlapped by `other.0. Read more
Source§

impl<T> Overlaps<NonEmpty<IntervalFull>> for NonEmpty<Interval<T>>

Source§

fn overlaps(&self, _other: &T) -> bool

Returns true iff self overlaps `other.0. Read more
Source§

fn is_overlapped_by(&self, other: &T) -> bool
where T: Overlaps<Self>,

Returns true iff self is overlapped by `other.0. Read more
Source§

impl<T> Overlaps<NonEmpty<IntervalFull>> for NonEmpty<IntervalFrom<T>>

Source§

fn overlaps(&self, _other: &T) -> bool

Returns true iff self overlaps `other.0. Read more
Source§

fn is_overlapped_by(&self, other: &T) -> bool
where T: Overlaps<Self>,

Returns true iff self is overlapped by `other.0. Read more
Source§

impl Overlaps<NonEmpty<IntervalFull>> for NonEmpty<IntervalFull>

Source§

fn overlaps(&self, _other: &T) -> bool

Returns true iff self overlaps `other.0. Read more
Source§

fn is_overlapped_by(&self, other: &T) -> bool
where T: Overlaps<Self>,

Returns true iff self is overlapped by `other.0. Read more
Source§

impl<T> Overlaps<NonEmpty<IntervalFull>> for NonEmpty<IntervalTo<T>>

Source§

fn overlaps(&self, _other: &T) -> bool

Returns true iff self overlaps `other.0. Read more
Source§

fn is_overlapped_by(&self, other: &T) -> bool
where T: Overlaps<Self>,

Returns true iff self is overlapped by `other.0. Read more
Source§

impl<T> Overlaps<NonEmpty<IntervalTo<T>>> for NonEmpty<Interval<T>>

Source§

fn overlaps(&self, _other: &T) -> bool

Returns true iff self overlaps `other.0. Read more
Source§

fn is_overlapped_by(&self, other: &T) -> bool
where T: Overlaps<Self>,

Returns true iff self is overlapped by `other.0. Read more
Source§

impl<T> Overlaps<NonEmpty<IntervalTo<T>>> for NonEmpty<IntervalFrom<T>>

Source§

fn overlaps(&self, _other: &T) -> bool

Returns true iff self overlaps `other.0. Read more
Source§

fn is_overlapped_by(&self, other: &T) -> bool
where T: Overlaps<Self>,

Returns true iff self is overlapped by `other.0. Read more
Source§

impl<T> Overlaps<NonEmpty<IntervalTo<T>>> for NonEmpty<IntervalFull>

Source§

fn overlaps(&self, _other: &T) -> bool

Returns true iff self overlaps `other.0. Read more
Source§

fn is_overlapped_by(&self, other: &T) -> bool
where T: Overlaps<Self>,

Returns true iff self is overlapped by `other.0. Read more
Source§

impl<T> Overlaps<NonEmpty<IntervalTo<T>>> for NonEmpty<IntervalTo<T>>

Source§

fn overlaps(&self, _other: &T) -> bool

Returns true iff self overlaps `other.0. Read more
Source§

fn is_overlapped_by(&self, other: &T) -> bool
where T: Overlaps<Self>,

Returns true iff self is overlapped by `other.0. Read more
Source§

impl<T: PartialEq> PartialEq for NonEmpty<T>

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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<T: PartialOrd> PartialOrd for NonEmpty<T>

Source§

fn partial_cmp(&self, other: &NonEmpty<T>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<T> Precedes<NonEmpty<Interval<T>>> for NonEmpty<Interval<T>>
where T: PartialOrd,

Source§

fn precedes(&self, other: &NonEmpty<Interval<T>>) -> bool

Returns true iff self precedes `other.0. Read more
Source§

fn is_preceded_by(&self, other: &T) -> bool
where T: Precedes<Self>,

Returns true iff self is preceded by `other.0. Read more
Source§

impl<T> Precedes<NonEmpty<Interval<T>>> for NonEmpty<IntervalFrom<T>>

Source§

fn precedes(&self, _other: &T) -> bool

Returns true iff self precedes `other.0. Read more
Source§

fn is_preceded_by(&self, other: &T) -> bool
where T: Precedes<Self>,

Returns true iff self is preceded by `other.0. Read more
Source§

impl<T> Precedes<NonEmpty<Interval<T>>> for NonEmpty<IntervalFull>

Source§

fn precedes(&self, _other: &T) -> bool

Returns true iff self precedes `other.0. Read more
Source§

fn is_preceded_by(&self, other: &T) -> bool
where T: Precedes<Self>,

Returns true iff self is preceded by `other.0. Read more
Source§

impl<T> Precedes<NonEmpty<Interval<T>>> for NonEmpty<IntervalTo<T>>
where T: PartialOrd,

Source§

fn precedes(&self, other: &NonEmpty<Interval<T>>) -> bool

Returns true iff self precedes `other.0. Read more
Source§

fn is_preceded_by(&self, other: &T) -> bool
where T: Precedes<Self>,

Returns true iff self is preceded by `other.0. Read more
Source§

impl<T> Precedes<NonEmpty<IntervalFrom<T>>> for NonEmpty<Interval<T>>
where T: PartialOrd,

Source§

fn precedes(&self, other: &NonEmpty<IntervalFrom<T>>) -> bool

Returns true iff self precedes `other.0. Read more
Source§

fn is_preceded_by(&self, other: &T) -> bool
where T: Precedes<Self>,

Returns true iff self is preceded by `other.0. Read more
Source§

impl<T> Precedes<NonEmpty<IntervalFrom<T>>> for NonEmpty<IntervalFrom<T>>

Source§

fn precedes(&self, _other: &T) -> bool

Returns true iff self precedes `other.0. Read more
Source§

fn is_preceded_by(&self, other: &T) -> bool
where T: Precedes<Self>,

Returns true iff self is preceded by `other.0. Read more
Source§

impl<T> Precedes<NonEmpty<IntervalFrom<T>>> for NonEmpty<IntervalFull>

Source§

fn precedes(&self, _other: &T) -> bool

Returns true iff self precedes `other.0. Read more
Source§

fn is_preceded_by(&self, other: &T) -> bool
where T: Precedes<Self>,

Returns true iff self is preceded by `other.0. Read more
Source§

impl<T> Precedes<NonEmpty<IntervalFrom<T>>> for NonEmpty<IntervalTo<T>>
where T: PartialOrd,

Source§

fn precedes(&self, other: &NonEmpty<IntervalFrom<T>>) -> bool

Returns true iff self precedes `other.0. Read more
Source§

fn is_preceded_by(&self, other: &T) -> bool
where T: Precedes<Self>,

Returns true iff self is preceded by `other.0. Read more
Source§

impl<T> Precedes<NonEmpty<IntervalFull>> for NonEmpty<Interval<T>>

Source§

fn precedes(&self, _other: &T) -> bool

Returns true iff self precedes `other.0. Read more
Source§

fn is_preceded_by(&self, other: &T) -> bool
where T: Precedes<Self>,

Returns true iff self is preceded by `other.0. Read more
Source§

impl<T> Precedes<NonEmpty<IntervalFull>> for NonEmpty<IntervalFrom<T>>

Source§

fn precedes(&self, _other: &T) -> bool

Returns true iff self precedes `other.0. Read more
Source§

fn is_preceded_by(&self, other: &T) -> bool
where T: Precedes<Self>,

Returns true iff self is preceded by `other.0. Read more
Source§

impl Precedes<NonEmpty<IntervalFull>> for NonEmpty<IntervalFull>

Source§

fn precedes(&self, _other: &T) -> bool

Returns true iff self precedes `other.0. Read more
Source§

fn is_preceded_by(&self, other: &T) -> bool
where T: Precedes<Self>,

Returns true iff self is preceded by `other.0. Read more
Source§

impl<T> Precedes<NonEmpty<IntervalFull>> for NonEmpty<IntervalTo<T>>

Source§

fn precedes(&self, _other: &T) -> bool

Returns true iff self precedes `other.0. Read more
Source§

fn is_preceded_by(&self, other: &T) -> bool
where T: Precedes<Self>,

Returns true iff self is preceded by `other.0. Read more
Source§

impl<T> Precedes<NonEmpty<IntervalTo<T>>> for NonEmpty<Interval<T>>

Source§

fn precedes(&self, _other: &T) -> bool

Returns true iff self precedes `other.0. Read more
Source§

fn is_preceded_by(&self, other: &T) -> bool
where T: Precedes<Self>,

Returns true iff self is preceded by `other.0. Read more
Source§

impl<T> Precedes<NonEmpty<IntervalTo<T>>> for NonEmpty<IntervalFrom<T>>

Source§

fn precedes(&self, _other: &T) -> bool

Returns true iff self precedes `other.0. Read more
Source§

fn is_preceded_by(&self, other: &T) -> bool
where T: Precedes<Self>,

Returns true iff self is preceded by `other.0. Read more
Source§

impl<T> Precedes<NonEmpty<IntervalTo<T>>> for NonEmpty<IntervalFull>

Source§

fn precedes(&self, _other: &T) -> bool

Returns true iff self precedes `other.0. Read more
Source§

fn is_preceded_by(&self, other: &T) -> bool
where T: Precedes<Self>,

Returns true iff self is preceded by `other.0. Read more
Source§

impl<T> Precedes<NonEmpty<IntervalTo<T>>> for NonEmpty<IntervalTo<T>>

Source§

fn precedes(&self, _other: &T) -> bool

Returns true iff self precedes `other.0. Read more
Source§

fn is_preceded_by(&self, other: &T) -> bool
where T: Precedes<Self>,

Returns true iff self is preceded by `other.0. Read more
Source§

impl<T> Starts<NonEmpty<Interval<T>>> for NonEmpty<Interval<T>>
where T: PartialOrd,

Source§

fn starts(&self, other: &NonEmpty<Interval<T>>) -> bool

Returns true iff self starts `other.0. Read more
Source§

fn is_started_by(&self, other: &T) -> bool
where T: Starts<Self>,

Returns true iff self is started by `other.0. Read more
Source§

impl<T> Starts<NonEmpty<Interval<T>>> for NonEmpty<IntervalFrom<T>>

Source§

fn starts(&self, _other: &T) -> bool

Returns true iff self starts `other.0. Read more
Source§

fn is_started_by(&self, other: &T) -> bool
where T: Starts<Self>,

Returns true iff self is started by `other.0. Read more
Source§

impl<T> Starts<NonEmpty<Interval<T>>> for NonEmpty<IntervalFull>

Source§

fn starts(&self, _other: &T) -> bool

Returns true iff self starts `other.0. Read more
Source§

fn is_started_by(&self, other: &T) -> bool
where T: Starts<Self>,

Returns true iff self is started by `other.0. Read more
Source§

impl<T> Starts<NonEmpty<Interval<T>>> for NonEmpty<IntervalTo<T>>

Source§

fn starts(&self, _other: &T) -> bool

Returns true iff self starts `other.0. Read more
Source§

fn is_started_by(&self, other: &T) -> bool
where T: Starts<Self>,

Returns true iff self is started by `other.0. Read more
Source§

impl<T> Starts<NonEmpty<IntervalFrom<T>>> for NonEmpty<Interval<T>>
where T: PartialOrd,

Source§

fn starts(&self, other: &NonEmpty<IntervalFrom<T>>) -> bool

Returns true iff self starts `other.0. Read more
Source§

fn is_started_by(&self, other: &T) -> bool
where T: Starts<Self>,

Returns true iff self is started by `other.0. Read more
Source§

impl<T> Starts<NonEmpty<IntervalFrom<T>>> for NonEmpty<IntervalFrom<T>>

Source§

fn starts(&self, _other: &T) -> bool

Returns true iff self starts `other.0. Read more
Source§

fn is_started_by(&self, other: &T) -> bool
where T: Starts<Self>,

Returns true iff self is started by `other.0. Read more
Source§

impl<T> Starts<NonEmpty<IntervalFrom<T>>> for NonEmpty<IntervalFull>

Source§

fn starts(&self, _other: &T) -> bool

Returns true iff self starts `other.0. Read more
Source§

fn is_started_by(&self, other: &T) -> bool
where T: Starts<Self>,

Returns true iff self is started by `other.0. Read more
Source§

impl<T> Starts<NonEmpty<IntervalFrom<T>>> for NonEmpty<IntervalTo<T>>

Source§

fn starts(&self, _other: &T) -> bool

Returns true iff self starts `other.0. Read more
Source§

fn is_started_by(&self, other: &T) -> bool
where T: Starts<Self>,

Returns true iff self is started by `other.0. Read more
Source§

impl<T> Starts<NonEmpty<IntervalFull>> for NonEmpty<Interval<T>>

Source§

fn starts(&self, _other: &T) -> bool

Returns true iff self starts `other.0. Read more
Source§

fn is_started_by(&self, other: &T) -> bool
where T: Starts<Self>,

Returns true iff self is started by `other.0. Read more
Source§

impl<T> Starts<NonEmpty<IntervalFull>> for NonEmpty<IntervalFrom<T>>

Source§

fn starts(&self, _other: &T) -> bool

Returns true iff self starts `other.0. Read more
Source§

fn is_started_by(&self, other: &T) -> bool
where T: Starts<Self>,

Returns true iff self is started by `other.0. Read more
Source§

impl Starts<NonEmpty<IntervalFull>> for NonEmpty<IntervalFull>

Source§

fn starts(&self, _other: &T) -> bool

Returns true iff self starts `other.0. Read more
Source§

fn is_started_by(&self, other: &T) -> bool
where T: Starts<Self>,

Returns true iff self is started by `other.0. Read more
Source§

impl<T> Starts<NonEmpty<IntervalFull>> for NonEmpty<IntervalTo<T>>

Source§

fn starts(&self, _other: &T) -> bool

Returns true iff self starts `other.0. Read more
Source§

fn is_started_by(&self, other: &T) -> bool
where T: Starts<Self>,

Returns true iff self is started by `other.0. Read more
Source§

impl<T> Starts<NonEmpty<IntervalTo<T>>> for NonEmpty<Interval<T>>
where T: PartialOrd,

Source§

fn starts(&self, other: &NonEmpty<IntervalTo<T>>) -> bool

Returns true iff self starts `other.0. Read more
Source§

fn is_started_by(&self, other: &T) -> bool
where T: Starts<Self>,

Returns true iff self is started by `other.0. Read more
Source§

impl<T> Starts<NonEmpty<IntervalTo<T>>> for NonEmpty<IntervalFrom<T>>

Source§

fn starts(&self, _other: &T) -> bool

Returns true iff self starts `other.0. Read more
Source§

fn is_started_by(&self, other: &T) -> bool
where T: Starts<Self>,

Returns true iff self is started by `other.0. Read more
Source§

impl<T> Starts<NonEmpty<IntervalTo<T>>> for NonEmpty<IntervalFull>

Source§

fn starts(&self, _other: &T) -> bool

Returns true iff self starts `other.0. Read more
Source§

fn is_started_by(&self, other: &T) -> bool
where T: Starts<Self>,

Returns true iff self is started by `other.0. Read more
Source§

impl<T> Starts<NonEmpty<IntervalTo<T>>> for NonEmpty<IntervalTo<T>>
where T: PartialOrd,

Source§

fn starts(&self, other: &NonEmpty<IntervalTo<T>>) -> bool

Returns true iff self starts `other.0. Read more
Source§

fn is_started_by(&self, other: &T) -> bool
where T: Starts<Self>,

Returns true iff self is started by `other.0. Read more
Source§

impl<T> StructuralPartialEq for NonEmpty<T>

Source§

impl<T> TryFrom<Interval<T>> for NonEmpty<Interval<T>>
where T: PartialOrd,

Source§

type Error = IntervalError

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

fn try_from(value: Interval<T>) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

§

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

§

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