pub enum CaptureVariant {
Unnamed,
ManyUnnamed,
NumberedUnnamed {
sections: usize,
},
Named(String),
ManyNamed(String),
NumberedNamed {
sections: usize,
name: String,
},
}
Expand description
Variants that indicate how part of a string should be captured.
Variants
Unnamed
{}
ManyUnnamed
{*}
NumberedUnnamed
Fields
sections: usize
Number of sections to match.
{5}
Named(String)
{name} - captures a section and adds it to the map with a given name.
ManyNamed(String)
{*:name} - captures over many sections and adds it to the map with a given name.
NumberedNamed
Fields
sections: usize
Number of sections to match.
name: String
The key to be entered in the Matches
map.
{2:name} - captures a fixed number of sections with a given name.
Trait Implementations
sourceimpl Clone for CaptureVariant
impl Clone for CaptureVariant
sourcefn clone(&self) -> CaptureVariant
fn clone(&self) -> CaptureVariant
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for CaptureVariant
impl Debug for CaptureVariant
sourceimpl<'a> From<RefCaptureVariant<'a>> for CaptureVariant
impl<'a> From<RefCaptureVariant<'a>> for CaptureVariant
sourcefn from(v: RefCaptureVariant<'a>) -> Self
fn from(v: RefCaptureVariant<'a>) -> Self
Performs the conversion.
sourceimpl PartialEq<CaptureVariant> for CaptureVariant
impl PartialEq<CaptureVariant> for CaptureVariant
sourcefn eq(&self, other: &CaptureVariant) -> bool
fn eq(&self, other: &CaptureVariant) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &CaptureVariant) -> bool
fn ne(&self, other: &CaptureVariant) -> bool
This method tests for !=
.
impl StructuralPartialEq for CaptureVariant
Auto Trait Implementations
impl RefUnwindSafe for CaptureVariant
impl Send for CaptureVariant
impl Sync for CaptureVariant
impl Unpin for CaptureVariant
impl UnwindSafe for CaptureVariant
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more