Struct StringPattern

Source
pub struct StringPattern<M> { /* private fields */ }

Implementations§

Source§

impl<M> StringPattern<M>
where M: NegatePattern,

Source

pub fn not(self) -> StringPattern<M::Output>

Source§

impl<M> StringPattern<M>

Source

pub fn repeat<'m>(self, count: impl RepeatCount) -> StringPattern<Repeat<'m, M>>

Source

pub fn optional<'m>(self) -> StringPattern<Repeat<'m, M>>

Source§

impl<'m, M> StringPattern<Repeat<'m, M>>

Source

pub fn greedy(self) -> Self

First attempts to match the most repetitions, then backtracks to fewer if the rest of the pattern fails.

Source

pub fn lazy(self) -> Self

First attempts to match the fewest repetitions, then backtracks to more if the rest of the pattern fails.

Source

pub fn simple(self) -> Self

Repeats as many times as the repeated pattern matches and does not backtrack.

Source§

impl<M: IntoMatchString> StringPattern<M>

Source

pub fn matcher<'m>(self) -> StringMatcher<M::Matcher<'m>>

Trait Implementations§

Source§

impl<'m, A, B> Add<StringPattern<B>> for StringPattern<A>

Source§

type Output = StringPattern<MatchPlus<A, B>>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: StringPattern<B>) -> Self::Output

Performs the + operation. Read more
Source§

impl<M1, M2> BitAnd<StringPattern<M2>> for StringPattern<M1>
where M1: IntersectPattern<M2>,

Source§

type Output = StringPattern<<M1 as IntersectPattern<M2>>::Output>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: StringPattern<M2>) -> Self::Output

Performs the & operation. Read more
Source§

impl<A, B> BitOr<StringPattern<B>> for StringPattern<A>

Source§

type Output = StringPattern<MatchOr<A, B>>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: StringPattern<B>) -> Self::Output

Performs the | operation. Read more
Source§

impl<M: Clone> Clone for StringPattern<M>

Source§

fn clone(&self) -> StringPattern<M>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'m, M: MatchString<'m>> Debug for StringPattern<M>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<M: IntoMatchString> From<M> for StringPattern<M>

Source§

fn from(inner: M) -> Self

Converts to this type from the input type.
Source§

impl<M> Mul<RangeFrom<u32>> for StringPattern<M>

Source§

type Output = StringPattern<Repeat<'static, M>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: RangeFrom<u32>) -> Self::Output

Performs the * operation. Read more
Source§

impl<M> Mul<RangeFull> for StringPattern<M>

Source§

type Output = StringPattern<Repeat<'static, M>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: RangeFull) -> Self::Output

Performs the * operation. Read more
Source§

impl<M> Mul<RangeInclusive<u32>> for StringPattern<M>

Source§

type Output = StringPattern<Repeat<'static, M>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: RangeInclusive<u32>) -> Self::Output

Performs the * operation. Read more
Source§

impl<M> Mul<RangeToInclusive<u32>> for StringPattern<M>

Source§

type Output = StringPattern<Repeat<'static, M>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: RangeToInclusive<u32>) -> Self::Output

Performs the * operation. Read more
Source§

impl<M> Mul<StringPattern<M>> for RangeFrom<u32>

Source§

type Output = StringPattern<Repeat<'static, M>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: StringPattern<M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<M> Mul<StringPattern<M>> for RangeFull

Source§

type Output = StringPattern<Repeat<'static, M>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: StringPattern<M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<M> Mul<StringPattern<M>> for RangeInclusive<u32>

Source§

type Output = StringPattern<Repeat<'static, M>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: StringPattern<M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<M> Mul<StringPattern<M>> for RangeToInclusive<u32>

Source§

type Output = StringPattern<Repeat<'static, M>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: StringPattern<M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<M> Mul<StringPattern<M>> for u32

Source§

type Output = StringPattern<Repeat<'static, M>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: StringPattern<M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<M> Mul<u32> for StringPattern<M>

Source§

type Output = StringPattern<Repeat<'static, M>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: u32) -> Self::Output

Performs the * operation. Read more
Source§

impl<M> Not for StringPattern<M>
where M: NegatePattern,

Source§

type Output = StringPattern<<M as NegatePattern>::Output>

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more

Auto Trait Implementations§

§

impl<M> Freeze for StringPattern<M>
where M: Freeze,

§

impl<M> RefUnwindSafe for StringPattern<M>
where M: RefUnwindSafe,

§

impl<M> Send for StringPattern<M>
where M: Send,

§

impl<M> Sync for StringPattern<M>
where M: Sync,

§

impl<M> Unpin for StringPattern<M>
where M: Unpin,

§

impl<M> UnwindSafe for StringPattern<M>
where M: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.