Enum numeric_sort::Segment
source · [−]Expand description
A reference to a homogenous segment of text in a string.
Ord
and Eq
are implemented for this type, which delegate to their respective types for same variant comparison,
and otherwise considers every Segment::Number
to come before every Segment::Text
.
Variants
Number(Number<'a>)
Text(Text<'a>)
Implementations
sourceimpl<'a> Segment<'a>
impl<'a> Segment<'a>
Trait Implementations
sourceimpl<'a> Ord for Segment<'a>
impl<'a> Ord for Segment<'a>
sourceimpl<'a> PartialOrd<Segment<'a>> for Segment<'a>
impl<'a> PartialOrd<Segment<'a>> for Segment<'a>
sourcefn partial_cmp(&self, other: &Segment<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &Segment<'a>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<'a> Copy for Segment<'a>
impl<'a> Eq for Segment<'a>
impl<'a> StructuralEq for Segment<'a>
impl<'a> StructuralPartialEq for Segment<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for Segment<'a>
impl<'a> Send for Segment<'a>
impl<'a> Sync for Segment<'a>
impl<'a> Unpin for Segment<'a>
impl<'a> UnwindSafe for Segment<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more