pub struct RangeCase<T: Endpoint> { /* private fields */ }Expand description
Some functions don’t care whether their input is normalized; they
take impl Into<RangeCase<...>>.
When a function doesn’t care about normalisation and doesn’t want
ownership, it can simply accept slices &[(T, T)].
Implementations§
Source§impl<T: Endpoint> RangeCase<T>
impl<T: Endpoint> RangeCase<T>
Sourcepub fn from_vec(inner: Vec<(T, T)>) -> Self
pub fn from_vec(inner: Vec<(T, T)>) -> Self
Creates a RangeCase from a (not necessarily normalized) vector of ranges.
This operation takes constant time.
Sourcepub fn from_range_vec(set: RangeVec<T>) -> Self
pub fn from_range_vec(set: RangeVec<T>) -> Self
Sourcepub fn into_inner(self) -> Vec<(T, T)>
pub fn into_inner(self) -> Vec<(T, T)>
Returns the underlying vector
This operation takes constant time.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for RangeCase<T>
impl<T> RefUnwindSafe for RangeCase<T>where
T: RefUnwindSafe,
impl<T> Send for RangeCase<T>where
T: Send,
impl<T> Sync for RangeCase<T>where
T: Sync,
impl<T> Unpin for RangeCase<T>where
T: Unpin,
impl<T> UnwindSafe for RangeCase<T>where
T: 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