pub struct OneOrMore<M: Matcher>(/* private fields */);Expand description
A matcher which matches one or more occurences of a given item.
Trait Implementations§
Source§impl<M: Matcher> Matcher for OneOrMore<M>
impl<M: Matcher> Matcher for OneOrMore<M>
Source§fn matches<I: ResetIterator<Item = M::Item>>(&self, input: &mut I) -> bool
fn matches<I: ResetIterator<Item = M::Item>>(&self, input: &mut I) -> bool
Determine how many consecutive characters in the input are
matched by this matcher.
Source§fn zero_or_more(self) -> ZeroOrMore<Self>
fn zero_or_more(self) -> ZeroOrMore<Self>
Construct a given matcher that matches zero or some items.
Source§fn one_or_more(self) -> OneOrMore<Self>
fn one_or_more(self) -> OneOrMore<Self>
Construct a given matcher that matches one or some items.
Source§fn or<Rhs: Matcher<Item = Self::Item>>(self, other: Rhs) -> Or<Self, Rhs>
fn or<Rhs: Matcher<Item = Self::Item>>(self, other: Rhs) -> Or<Self, Rhs>
Construct a matcher from two matchers.
fn then<Rhs: Matcher<Item = Self::Item>>(self, other: Rhs) -> Then<Self, Rhs>
impl<M: Copy + Matcher> Copy for OneOrMore<M>
Auto Trait Implementations§
impl<M> Freeze for OneOrMore<M>where
M: Freeze,
impl<M> RefUnwindSafe for OneOrMore<M>where
M: RefUnwindSafe,
impl<M> Send for OneOrMore<M>where
M: Send,
impl<M> Sync for OneOrMore<M>where
M: Sync,
impl<M> Unpin for OneOrMore<M>where
M: Unpin,
impl<M> UnwindSafe for OneOrMore<M>where
M: UnwindSafe,
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