enum SuffixKind {
Minimal,
Maximal,
}
Expand description
The kind of suffix to extract.
Variants§
Minimal
Extract the smallest lexicographic suffix from a string.
Technically, this doesn’t actually pick the smallest lexicographic
suffix. e.g., Given the choice between a
and aa
, this will choose
the latter over the former, even though a < aa
. The reasoning for
this isn’t clear from the paper, but it still smells like a minimal
suffix.
Maximal
Extract the largest lexicographic suffix from a string.
Unlike Minimal
, this really does pick the maximum suffix. e.g., Given
the choice between z
and zz
, this will choose the latter over the
former.
Implementations§
source§impl SuffixKind
impl SuffixKind
sourcefn cmp(self, current: u8, candidate: u8) -> SuffixOrdering
fn cmp(self, current: u8, candidate: u8) -> SuffixOrdering
Returns true if and only if the given candidate byte indicates that it should replace the current suffix as the maximal (or minimal) suffix.
Trait Implementations§
source§impl Clone for SuffixKind
impl Clone for SuffixKind
source§fn clone(&self) -> SuffixKind
fn clone(&self) -> SuffixKind
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SuffixKind
impl Debug for SuffixKind
impl Copy for SuffixKind
Auto Trait Implementations§
impl Freeze for SuffixKind
impl RefUnwindSafe for SuffixKind
impl Send for SuffixKind
impl Sync for SuffixKind
impl Unpin for SuffixKind
impl UnwindSafe for SuffixKind
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