[−][src]Struct parser_fuck::combinators::One
Match an item
example
let code = "asd".span(); let a = one('a'); let r = a.parse(code); assert_eq!(r, Some(0..1))
Methods
impl<T> One<T>[src]
Trait Implementations
impl<T: Clone> Clone for One<T>[src]
impl<T: Debug> Debug for One<T>[src]
impl<T: Eq> Eq for One<T>[src]
impl<I: TimeTravel, T> Parser<I> for One<T> where
I::Item: PartialEq<T>, [src]
I::Item: PartialEq<T>,
type Output = Range<usize>
fn parse(&self, input: I) -> Option<Self::Output>[src]
fn map<U, F>(self, f: F) -> Map<Self, I, F> where
Self: Sized,
F: FnMut(Self::Output) -> U, [src]
Self: Sized,
F: FnMut(Self::Output) -> U,
fn and<B>(self, b: B) -> And<Self, B, I> where
Self: Sized,
B: Parser<I>, [src]
Self: Sized,
B: Parser<I>,
fn or<B>(self, b: B) -> Or<Self, B, I> where
Self: Sized,
B: Parser<I, Output = Self::Output>, [src]
Self: Sized,
B: Parser<I, Output = Self::Output>,
fn not(self) -> Not<Self, I> where
Self: Sized, [src]
Self: Sized,
fn many(self) -> Many<Self, I> where
Self: Sized, [src]
Self: Sized,
fn many1(self) -> Many<Self, I> where
Self: Sized, [src]
Self: Sized,
fn many_min(self, min: usize) -> Many<Self, I> where
Self: Sized, [src]
Self: Sized,
fn many_max(self, max: usize) -> Many<Self, I> where
Self: Sized, [src]
Self: Sized,
fn many1_max(self, max: usize) -> Many<Self, I> where
Self: Sized, [src]
Self: Sized,
fn many_min_max(self, min: usize, max: usize) -> Many<Self, I> where
Self: Sized, [src]
Self: Sized,
fn some(self, count: usize) -> Many<Self, I> where
Self: Sized, [src]
Self: Sized,
fn may(self) -> May<Self, I> where
Self: Sized, [src]
Self: Sized,
fn iter(self) -> Iter<Self, I> where
Self: Sized, [src]
Self: Sized,
fn and_then<U, F>(self, f: F) -> AndThen<Self, I, F> where
Self: Sized,
U: Parser<I>,
F: FnMut(Self::Output) -> U, [src]
Self: Sized,
U: Parser<I>,
F: FnMut(Self::Output) -> U,
fn or_else<U, F>(self, f: F) -> OrElse<Self, I, F> where
Self: Sized,
U: Parser<I, Output = Self::Output>,
F: FnMut() -> U, [src]
Self: Sized,
U: Parser<I, Output = Self::Output>,
F: FnMut() -> U,
fn or_trans<F>(self, f: F) -> OrTrans<Self, I, F> where
Self: Sized,
F: FnMut(I, Range<usize>) -> Self::Output, [src]
Self: Sized,
F: FnMut(I, Range<usize>) -> Self::Output,
fn or_trans_noend<F>(self, f: F) -> OrTrans<Self, I, F> where
Self: Sized,
F: FnMut(I, Range<usize>) -> Self::Output, [src]
Self: Sized,
F: FnMut(I, Range<usize>) -> Self::Output,
fn dyns(self) -> Dyn<I, Self::Output> where
Self: Sized + 'static, [src]
Self: Sized + 'static,
impl<T: PartialEq> PartialEq<One<T>> for One<T>[src]
impl<T> StructuralEq for One<T>[src]
impl<T> StructuralPartialEq for One<T>[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for One<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for One<T> where
T: Send,
T: Send,
impl<T> Sync for One<T> where
T: Sync,
T: Sync,
impl<T> Unpin for One<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for One<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<I, U, F> Parser<I> for F where
F: Fn(I) -> Option<U>,
I: TimeTravel, [src]
F: Fn(I) -> Option<U>,
I: TimeTravel,
type Output = U
fn parse(&Self, I) -> Option<<F as Parser<I>>::Output>[src]
fn map<U, F>(self, f: F) -> Map<Self, I, F> where
Self: Sized,
F: FnMut(Self::Output) -> U, [src]
Self: Sized,
F: FnMut(Self::Output) -> U,
fn and<B>(self, b: B) -> And<Self, B, I> where
Self: Sized,
B: Parser<I>, [src]
Self: Sized,
B: Parser<I>,
fn or<B>(self, b: B) -> Or<Self, B, I> where
Self: Sized,
B: Parser<I, Output = Self::Output>, [src]
Self: Sized,
B: Parser<I, Output = Self::Output>,
fn not(self) -> Not<Self, I> where
Self: Sized, [src]
Self: Sized,
fn many(self) -> Many<Self, I> where
Self: Sized, [src]
Self: Sized,
fn many1(self) -> Many<Self, I> where
Self: Sized, [src]
Self: Sized,
fn many_min(self, min: usize) -> Many<Self, I> where
Self: Sized, [src]
Self: Sized,
fn many_max(self, max: usize) -> Many<Self, I> where
Self: Sized, [src]
Self: Sized,
fn many1_max(self, max: usize) -> Many<Self, I> where
Self: Sized, [src]
Self: Sized,
fn many_min_max(self, min: usize, max: usize) -> Many<Self, I> where
Self: Sized, [src]
Self: Sized,
fn some(self, count: usize) -> Many<Self, I> where
Self: Sized, [src]
Self: Sized,
fn may(self) -> May<Self, I> where
Self: Sized, [src]
Self: Sized,
fn iter(self) -> Iter<Self, I> where
Self: Sized, [src]
Self: Sized,
fn and_then<U, F>(self, f: F) -> AndThen<Self, I, F> where
Self: Sized,
U: Parser<I>,
F: FnMut(Self::Output) -> U, [src]
Self: Sized,
U: Parser<I>,
F: FnMut(Self::Output) -> U,
fn or_else<U, F>(self, f: F) -> OrElse<Self, I, F> where
Self: Sized,
U: Parser<I, Output = Self::Output>,
F: FnMut() -> U, [src]
Self: Sized,
U: Parser<I, Output = Self::Output>,
F: FnMut() -> U,
fn or_trans<F>(self, f: F) -> OrTrans<Self, I, F> where
Self: Sized,
F: FnMut(I, Range<usize>) -> Self::Output, [src]
Self: Sized,
F: FnMut(I, Range<usize>) -> Self::Output,
fn or_trans_noend<F>(self, f: F) -> OrTrans<Self, I, F> where
Self: Sized,
F: FnMut(I, Range<usize>) -> Self::Output, [src]
Self: Sized,
F: FnMut(I, Range<usize>) -> Self::Output,
fn dyns(self) -> Dyn<I, Self::Output> where
Self: Sized + 'static, [src]
Self: Sized + 'static,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,