pub struct SequencePattern(/* private fields */);Expand description
A pattern that matches a sequence of patterns in order.
This pattern is used to match multiple patterns consecutively, which is particularly useful for array elements or other sequential data structures.
§Examples
use dcbor_pattern::Pattern;
// Match a sequence of three specific text values
let pattern = Pattern::sequence(vec![
Pattern::text("first"),
Pattern::text("second"),
Pattern::text("third"),
]);Implementations§
Trait Implementations§
Source§impl Clone for SequencePattern
impl Clone for SequencePattern
Source§fn clone(&self) -> SequencePattern
fn clone(&self) -> SequencePattern
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 SequencePattern
impl Debug for SequencePattern
Source§impl Display for SequencePattern
impl Display for SequencePattern
Source§impl PartialEq for SequencePattern
impl PartialEq for SequencePattern
impl Eq for SequencePattern
impl StructuralPartialEq for SequencePattern
Auto Trait Implementations§
impl Freeze for SequencePattern
impl RefUnwindSafe for SequencePattern
impl Send for SequencePattern
impl Sync for SequencePattern
impl Unpin for SequencePattern
impl UnwindSafe for SequencePattern
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