pub struct Ranged<Position, T> {
pub start: Position,
pub end: Position,
pub item: T,
}
Fields
start: Position
end: Position
item: T
Trait Implementations
sourceimpl<P: PositionPrinter, T: Display> Display for Ranged<P, T>
impl<P: PositionPrinter, T: Display> Display for Ranged<P, T>
sourceimpl<I: InputOnce, O, E: ParseError<I>, C, S, P: Parser<I, O, E, C, S>> Parser<I, Ranged<<I as InputOnce>::Position, O>, E, C, S> for Ranged<P>
impl<I: InputOnce, O, E: ParseError<I>, C, S, P: Parser<I, O, E, C, S>> Parser<I, Ranged<<I as InputOnce>::Position, O>, E, C, S> for Ranged<P>
fn run(
&mut self,
args: Args<'_, '_, I, E, C, S>
) -> Option<Ranged<I::Position, O>>
fn by_ref(&mut self) -> MutParser<'_, Self>where
Self: Sized,
fn or_with<R, F: FnMut(R) -> Q, Q: ParserOnce<I, O, E, C, S>>(
self,
resource: R,
f: F
) -> OrWith<Self, R, F>where
Self: Sized,
fn case<F: for<'a, 'b> FnMut(O, Args<'a, 'b, I, E, C, S>) -> Cont<'a, 'b, I, O2, E, C, S>, O2>(
self,
f: F
) -> Case<Self, F, O, E>where
Self: Sized,
fn and_then<F: FnMut(O) -> Result<O2, M>, O2, M>(
self,
f: F
) -> AndThen<Self, F, M, O>where
Self: Sized,
E: MessageFrom<M>,
fn map<F: FnMut(O) -> O2, O2>(self, f: F) -> Map<Self, F, O>where
Self: Sized,
fn bind<F: FnMut(O) -> P, P: ParserOnce<I, O2, E, C, S>, O2>(
self,
f: F
) -> Bind<Self, F, O>where
Self: Sized,
fn fold<T, F: FnMut(T, O) -> T>(self, init: T, f: F) -> Fold<T, Self, F, O>where
Self: Sized,
fn fold1<T, F: FnMut(T, O) -> T>(self, init: T, f: F) -> Fold1<T, Self, F, O>where
Self: Sized,
fn sep_fold<T, F: FnMut(T, O) -> T, P: Parser<I, U, E, C, S>, U>(
self,
init: T,
sep: P,
f: F
) -> SepFold<T, Self, P, F, O, U>where
Self: Sized,
fn sep_reduce<T, F: FnMut(O, T, O) -> O, P: Parser<I, T, E, C, S>, U>(
self,
sep: P,
f: F
) -> SepReduce<Self, P, F, U>where
Self: Sized,
fn sep_fold1<T, F: FnMut(T, O) -> T, P: Parser<I, U, E, C, S>, U>(
self,
init: T,
sep: P,
f: F
) -> SepFold1<T, Self, P, F, O, U>where
Self: Sized,
fn extend<T>(self, value: T) -> ExtendParser<T, Self, O>where
Self: Sized,
fn extend1<T>(self, value: T) -> Extend1Parser<T, Self, O>where
Self: Sized,
fn sep_extend<T: Extend<O>, P: Parser<I, U, E, C, S>, U>(
self,
init: T,
sep: P
) -> SepExtend<T, Self, P, O, U>where
Self: Sized,
fn sep_extend1<T: Extend<O>, P: Parser<I, U, E, C, S>, U>(
self,
init: T,
sep: P
) -> SepExtend1<T, Self, P, O, U>where
Self: Sized,
fn many_map<T, F: FnMut(ManyIterator<'_, '_, Self, I, O, E, C, S>) -> T>(
self,
f: F
) -> ManyMap<Self, F, O>where
Self: Sized,
fn many_map_once<T, F: FnOnce(ManyIterator<'_, '_, Self, I, O, E, C, S>) -> T>(
self,
f: F
) -> ManyMap<Self, F, O>where
Self: Sized,
fn many_bind<O2, P: ParserOnce<I, O2, E, C, S>, F: FnMut(ManyIterator<'_, '_, Self, I, O, E, C, S>) -> P>(
self,
f: F
) -> ManyBind<Self, F, O>where
Self: Sized,
fn many_bind_once<O2, P: ParserOnce<I, O2, E, C, S>, F: FnOnce(ManyIterator<'_, '_, Self, I, O, E, C, S>) -> P>(
self,
f: F
) -> ManyBind<Self, F, O>where
Self: Sized,
fn sep<T: FromIterator<O>, P: Parser<I, U, E, C, S>, U>(
self,
sep: P
) -> Sep<Self, P, T, O, U>where
Self: Sized,
fn sep1<T: FromIterator<O>, P: Parser<I, U, E, C, S>, U>(
self,
sep: P
) -> Sep1<Self, P, T, O, U>where
Self: Sized,
fn sep_map<T, F: FnMut(SepIterator<'_, '_, Self, P, I, O, U, E, C, S>) -> T, P: Parser<I, U, E, C, S>, U>(
self,
sep: P,
f: F
) -> SepMap<Self, P, F, O, U>where
Self: Sized,
fn sep_map_once<T, F: FnOnce(SepIterator<'_, '_, Self, P, I, O, U, E, C, S>) -> T, P: Parser<I, U, E, C, S>, U>(
self,
sep: P,
f: F
) -> SepMap<Self, P, F, O, U>where
Self: Sized,
fn sep_bind<O2, F: FnMut(SepIterator<'_, '_, Self, P, I, O, T, E, C, S>) -> Q, P: Parser<I, T, E, C, S>, T, Q: ParserOnce<I, O2, E, C, S>>(
self,
sep: P,
f: F
) -> SepBind<Self, P, F, O, T>where
Self: Sized,
fn sep_bind_once<O2, F: FnOnce(SepIterator<'_, '_, Self, P, I, O, T, E, C, S>) -> Q, P: Parser<I, T, E, C, S>, T, Q: ParserOnce<I, O2, E, C, S>>(
self,
sep: P,
f: F
) -> SepBind<Self, P, F, O, T>where
Self: Sized,
fn repeat<T: FromIterator<O>, N: RangeWithOrd<usize>>(
self,
count: N
) -> Repeat<Self, T, O>where
Self: Sized,
sourceimpl<I: InputOnce, O, E: ParseError<I>, C, S, P: ParserOnce<I, O, E, C, S>> ParserOnce<I, Ranged<<I as InputOnce>::Position, O>, E, C, S> for Ranged<P>
impl<I: InputOnce, O, E: ParseError<I>, C, S, P: ParserOnce<I, O, E, C, S>> ParserOnce<I, Ranged<<I as InputOnce>::Position, O>, E, C, S> for Ranged<P>
fn run_once(
self,
args: Args<'_, '_, I, E, C, S>
) -> Option<Ranged<I::Position, O>>
fn case_once<F: for<'a, 'b> FnOnce(O, Args<'a, 'b, I, E, C, S>) -> Cont<'a, 'b, I, O2, E, C, S>, O2>(
self,
f: F
) -> Case<Self, F, O, E>where
Self: Sized,
fn and_then_once<F: FnOnce(O) -> Result<O2, M>, O2, M>(
self,
f: F
) -> AndThen<Self, F, M, O>where
Self: Sized,
E: MessageFrom<M>,
fn map_once<F: FnOnce(O) -> O2, O2>(self, f: F) -> Map<Self, F, O>where
Self: Sized,
fn to<O2>(self, value: O2) -> Value<Self, O2, O>where
Self: Sized,
fn skip(self) -> Value<Self, (), O>where
Self: Sized,
fn label<L>(self, label: L) -> Label<Self, L>where
Self: Sized,
E: MessageFrom<Expected<Format<L>>>,
fn label_with<F: FnMut() -> L, L>(self, label: F) -> LabelWith<Self, F>where
Self: Sized,
E: MessageFrom<Expected<Format<L>>>,
fn bind_once<F: FnOnce(O) -> P, P: ParserOnce<I, O2, E, C, S>, O2>(
self,
f: F
) -> Bind<Self, F, O>where
Self: Sized,
fn or<P: ParserOnce<I, O, E, C, S>>(self, other: P) -> Or<Self, P>where
Self: Sized,
fn or_not(self) -> OrNot<Self>where
Self: Sized,
fn or_with_once<R, F: FnOnce(R) -> Q, Q: ParserOnce<I, O, E, C, S>>(
self,
resource: R,
f: F
) -> OrWith<Self, R, F>where
Self: Sized,
fn between<P1: ParserOnce<I, Output1, E, C, S>, P2: ParserOnce<I, Output2, E, C, S>, Output1, Output2>(
self,
left: P1,
right: P2
) -> Between<P1, Self, P2, Output1, Output2>where
Self: Sized,
fn cut(self) -> Cut<Self>where
Self: Sized,
fn ranged(self) -> Ranged<Self>where
Self: Sized,
fn and<P: ParserOnce<I, O2, E, C, S>, O2>(self, other: P) -> And<Self, P>where
Self: Sized,
fn left<P: ParserOnce<I, O2, E, C, S>, O2>(self, other: P) -> Left<Self, P, O2>where
Self: Sized,
fn right<P: ParserOnce<I, O2, E, C, S>, O2>(self, other: P) -> Right<Self, P, O>where
Self: Sized,
fn get_str<B: FromIterator<I::Token>>(self) -> GetString<Self, B>where
Self: Sized,
fn get_str_extend<B: Extend<I::Token>>(
self,
value: B
) -> GetStringExtend<Self, B>where
Self: Sized,
sourceimpl<Position: PartialEq, T: PartialEq> PartialEq<Ranged<Position, T>> for Ranged<Position, T>
impl<Position: PartialEq, T: PartialEq> PartialEq<Ranged<Position, T>> for Ranged<Position, T>
impl<Position: Eq, T: Eq> Eq for Ranged<Position, T>
impl<Position, T> StructuralEq for Ranged<Position, T>
impl<Position, T> StructuralPartialEq for Ranged<Position, T>
Auto Trait Implementations
impl<Position, T> RefUnwindSafe for Ranged<Position, T>where
Position: RefUnwindSafe,
T: RefUnwindSafe,
impl<Position, T> Send for Ranged<Position, T>where
Position: Send,
T: Send,
impl<Position, T> Sync for Ranged<Position, T>where
Position: Sync,
T: Sync,
impl<Position, T> Unpin for Ranged<Position, T>where
Position: Unpin,
T: Unpin,
impl<Position, T> UnwindSafe for Ranged<Position, T>where
Position: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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