Struct lib_ruby_parser::source::CustomDecoder[][src]

pub struct CustomDecoder { /* fields omitted */ }

Custom decoder, a wrapper around a function

Implementations

impl CustomDecoder[src]

pub fn new(f: Box<dyn Fn(StringPtr, List<u8>) -> CustomDecoderResult>) -> Self[src]

Constructs a rewriter based on a given function

pub fn none() -> Self[src]

Constructs a no-op token rewriter that has no side effect. Default value.

pub fn as_option(
    &self
) -> Option<&dyn Fn(StringPtr, List<u8>) -> CustomDecoderResult>
[src]

Returns an optional reference to a function that rewrite tokens

Trait Implementations

impl Debug for CustomDecoder[src]

impl Default for CustomDecoder[src]

Auto Trait Implementations

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<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.