[][src]Struct gobble::reader::Escape

pub struct Escape { /* fields omitted */ }

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]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<V, F> Parser<V> for F where
    F: for<'a> Fn(&LCChars<'a>) -> Result<(LCChars<'a>, V), ParseError>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.