[−][src]Struct gobble::reader::Escape
A reader for strings, that allows escaping one char and mapping to another char. The returned string has already had the escape replace done
Implementations
impl Escape
[src]
pub fn e_map(self, f: char, t: char) -> Self
[src]
Add a character to the map, in a builder pattern way.
use gobble::*; let s = tag("\"").ig_then(esc('\"','\\') .e_map('t','\t').e_map('p','$')) .parse_s(r#""my \t \pstring""#).unwrap(); assert_eq!(s,"my \t $string")
Trait Implementations
impl Clone for Escape
[src]
impl Parser<String> for Escape
[src]
fn parse<'a>(&self, i: &LCChars<'a>) -> ParseRes<'a, String>
[src]
fn parse_s(&self, s: &str) -> Result<V, ParseError>
[src]
fn parse_sn<'a>(&self, s: &'a str) -> Result<(&'a str, V), ParseError>
[src]
fn then<P: Parser<V2>, V2>(self, p: P) -> Then<Self, P>
[src]
fn then_ig<P: Parser<V2>, V2>(self, p: P) -> ThenIg<Self, P, V, V2>
[src]
fn ig_then<P: Parser<V2>, V2>(self, p: P) -> IgThen<Self, P, V, V2>
[src]
fn or<P: Parser<V>>(self, p: P) -> Or<Self, P>
[src]
fn map<F: Fn(V) -> V2, V2>(self, f: F) -> Map<Self, V, V2, F>
[src]
fn try_map<F: Fn(V) -> Result<V2, ECode>, V2>(
self,
f: F
) -> TryMap<Self, V, V2, F>
[src]
self,
f: F
) -> TryMap<Self, V, V2, F>
fn asv<R: Clone>(self, r: R) -> As<Self, V, R>
[src]
fn map_err<F: Fn(ECode) -> ECode>(self, f: F) -> MapErr<Self, V, F>
[src]
fn brk(self) -> Break<Self, V>
[src]
Auto Trait Implementations
impl RefUnwindSafe for Escape
impl Send for Escape
impl Sync for Escape
impl Unpin for Escape
impl UnwindSafe for Escape
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<V, F> Parser<V> for F where
F: for<'a> Fn(&LCChars<'a>) -> Result<(LCChars<'a>, V), ParseError>,
[src]
F: for<'a> Fn(&LCChars<'a>) -> Result<(LCChars<'a>, V), ParseError>,
fn parse(&Self, &LCChars<'b>) -> Result<(LCChars<'b>, V), ParseError>
[src]
fn parse_s(&self, s: &str) -> Result<V, ParseError>
[src]
fn parse_sn<'a>(&self, s: &'a str) -> Result<(&'a str, V), ParseError>
[src]
fn then<P: Parser<V2>, V2>(self, p: P) -> Then<Self, P>
[src]
fn then_ig<P: Parser<V2>, V2>(self, p: P) -> ThenIg<Self, P, V, V2>
[src]
fn ig_then<P: Parser<V2>, V2>(self, p: P) -> IgThen<Self, P, V, V2>
[src]
fn or<P: Parser<V>>(self, p: P) -> Or<Self, P>
[src]
fn map<F: Fn(V) -> V2, V2>(self, f: F) -> Map<Self, V, V2, F>
[src]
fn try_map<F: Fn(V) -> Result<V2, ECode>, V2>(
self,
f: F
) -> TryMap<Self, V, V2, F>
[src]
self,
f: F
) -> TryMap<Self, V, V2, F>
fn asv<R: Clone>(self, r: R) -> As<Self, V, R>
[src]
fn map_err<F: Fn(ECode) -> ECode>(self, f: F) -> MapErr<Self, V, F>
[src]
fn brk(self) -> Break<Self, V>
[src]
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>,