pub trait Split:
Send
+ Sync
+ 'static {
// Required methods
fn split_once<'s>(&self, haystack: &'s str) -> Option<(&'s str, &'s str)>;
fn split<'s>(&self, haystack: &'s str) -> impl Iterator<Item = &'s str>;
}Expand description
Pattern usable for splitting strings. Used in Delimited
and DelimitedEntries deserializers.
§Standard implementations
&str: matches a string exactly[char; _]: matches any of the charsLazyRegex: matches a regular expression
Required Methods§
Sourcefn split_once<'s>(&self, haystack: &'s str) -> Option<(&'s str, &'s str)>
fn split_once<'s>(&self, haystack: &'s str) -> Option<(&'s str, &'s str)>
Splits the given haystack at most once from its start. This generalizes str::split_once().
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.