pub struct SepPattern { /* private fields */ }Expand description
A compiled separator pattern built from {…} syntax.
Implementations§
Source§impl SepPattern
impl SepPattern
Sourcepub fn find(&self, haystack: &str) -> Option<(usize, SepMatch)>
pub fn find(&self, haystack: &str) -> Option<(usize, SepMatch)>
Find the first match in haystack. Returns (offset, SepMatch) where
offset is the byte position where the match starts (= field content length).
Sourcepub fn match_at_start(&self, haystack: &str) -> Option<SepMatch>
pub fn match_at_start(&self, haystack: &str) -> Option<SepMatch>
Match only at the start of haystack (for consume_sep).
Trait Implementations§
Source§impl Clone for SepPattern
impl Clone for SepPattern
Source§fn clone(&self) -> SepPattern
fn clone(&self) -> SepPattern
Returns a duplicate 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 SepPattern
impl Debug for SepPattern
Source§impl<'de> Deserialize<'de> for SepPattern
impl<'de> Deserialize<'de> for SepPattern
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 SepPattern
impl PartialEq for SepPattern
Source§impl Serialize for SepPattern
impl Serialize for SepPattern
impl StructuralPartialEq for SepPattern
Auto Trait Implementations§
impl Freeze for SepPattern
impl RefUnwindSafe for SepPattern
impl Send for SepPattern
impl Sync for SepPattern
impl Unpin for SepPattern
impl UnsafeUnpin for SepPattern
impl UnwindSafe for SepPattern
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