pub enum SplitDelimiterBehavior {
Removed,
Isolated,
MergedWithPrevious,
MergedWithNext,
Contiguous,
}
Expand description
Defines the expected behavior for the delimiter of a Split Pattern
When splitting on '-'
for example, with input the-final--countdown
:
- Removed =>
[ "the", "final", "countdown" ]
- Isolated =>
[ "the", "-", "final", "-", "-", "countdown" ]
- MergedWithPrevious =>
[ "the-", "final-", "-", "countdown" ]
- MergedWithNext =>
[ "the", "-final", "-", "-countdown" ]
- Contiguous =>
[ "the", "-", "final", "--", "countdown" ]
Variants§
Trait Implementations§
source§impl Clone for SplitDelimiterBehavior
impl Clone for SplitDelimiterBehavior
source§fn clone(&self) -> SplitDelimiterBehavior
fn clone(&self) -> SplitDelimiterBehavior
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 SplitDelimiterBehavior
impl Debug for SplitDelimiterBehavior
source§impl<'de> Deserialize<'de> for SplitDelimiterBehavior
impl<'de> Deserialize<'de> for SplitDelimiterBehavior
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for SplitDelimiterBehavior
impl PartialEq for SplitDelimiterBehavior
source§fn eq(&self, other: &SplitDelimiterBehavior) -> bool
fn eq(&self, other: &SplitDelimiterBehavior) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for SplitDelimiterBehavior
impl Serialize for SplitDelimiterBehavior
impl Copy for SplitDelimiterBehavior
impl Eq for SplitDelimiterBehavior
impl StructuralPartialEq for SplitDelimiterBehavior
Auto Trait Implementations§
impl Freeze for SplitDelimiterBehavior
impl RefUnwindSafe for SplitDelimiterBehavior
impl Send for SplitDelimiterBehavior
impl Sync for SplitDelimiterBehavior
impl Unpin for SplitDelimiterBehavior
impl UnwindSafe for SplitDelimiterBehavior
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