Or4

Struct Or4 

Source
pub struct Or4<Z: HaystackItem, A: Matcher<Z>, B: Matcher<Z>, C: Matcher<Z>, D: Matcher<Z>>(pub PhantomData<Z>, pub PhantomData<A>, pub PhantomData<B>, pub PhantomData<C>, pub PhantomData<D>);

Tuple Fields§

§0: PhantomData<Z>§1: PhantomData<A>§2: PhantomData<B>§3: PhantomData<C>§4: PhantomData<D>

Trait Implementations§

Source§

impl<Z: HaystackItem, A: Matcher<Z>, B: Matcher<Z>, C: Matcher<Z>, D: Matcher<Z>> Debug for Or4<Z, A, B, C, D>

Source§

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

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

impl<Z: Default + HaystackItem, A: Default + Matcher<Z>, B: Default + Matcher<Z>, C: Default + Matcher<Z>, D: Default + Matcher<Z>> Default for Or4<Z, A, B, C, D>

Source§

fn default() -> Or4<Z, A, B, C, D>

Returns the “default value” for a type. Read more
Source§

impl<Z: HaystackItem, A: Matcher<Z>, B: Matcher<Z>, C: Matcher<Z>, D: Matcher<Z>> Matcher<Z> for Or4<Z, A, B, C, D>

Source§

fn matches<'a, Y: HaystackOf<'a, Z>>(hay: &mut Y) -> bool

Checks if the start of the haystack contains a match for this Matcher. If this method successfully matches the start of the haystack, hay is progressed so that hay.item() hasn’t been matched yet. On a fail, the state of hay is undefined.
Source§

fn all_matches<'a, Y: HaystackOf<'a, Z>>(hay: &mut Y) -> Vec<usize>

Produces a Vec of all valid haystack states produced as the result of a valid match at the start of hay, used to implement backtracking. The Vec is produced in reverse priority order, so the last match has the highest priority. After calling all_matches, the state of hay itself is undefined. Read more
Source§

fn captures<'a, Y: HaystackOf<'a, Z>>( hay: &mut Y, caps: &mut IndexedCaptures, ) -> bool

Checks if the start of the haystack contains a match for this Matcher, writing any groups to caps. Similar to matches, this method progresses hay and caps on a success. On a fail, they have undefined states. Read more
Source§

fn all_captures<'a, Y: HaystackOf<'a, Z>>( hay: &mut Y, caps: &mut IndexedCaptures, ) -> Vec<(usize, IndexedCaptures)>

Produces a Vec of all valid captures (and accompanying haystack states) present at the start of hay. Used to implement backtracking for capturing methods. As with all_matches, the resulting Vec is produced in reverse priority order. After calling all_captures, the state of hay and caps are undefined. Read more

Auto Trait Implementations§

§

impl<Z, A, B, C, D> Freeze for Or4<Z, A, B, C, D>

§

impl<Z, A, B, C, D> RefUnwindSafe for Or4<Z, A, B, C, D>

§

impl<Z, A, B, C, D> Send for Or4<Z, A, B, C, D>
where Z: Send, A: Send, B: Send, C: Send, D: Send,

§

impl<Z, A, B, C, D> Sync for Or4<Z, A, B, C, D>
where Z: Sync, A: Sync, B: Sync, C: Sync, D: Sync,

§

impl<Z, A, B, C, D> Unpin for Or4<Z, A, B, C, D>
where Z: Unpin, A: Unpin, B: Unpin, C: Unpin, D: Unpin,

§

impl<Z, A, B, C, D> UnwindSafe for Or4<Z, A, B, C, D>

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> 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, 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.