Trait lib_ruby_parser::source::MaybeDecoderAPI[][src]

pub trait MaybeDecoderAPI {
    fn new_some(decoder: Decoder) -> Self
    where
        Self: Sized
;
fn new_none() -> Self
    where
        Self: Sized
;
fn is_some(&self) -> bool;
fn is_none(&self) -> bool;
fn as_decoder(&self) -> Option<&Decoder>;
fn as_decoder_mut(&mut self) -> Option<&mut Decoder>;
fn into_decoder(self) -> Decoder; }
Expand description

Trait with common MaybeDecoder APIs

Required methods

Constructs Some variant

Constructs None variant

Returns true if self is Some

Returns true if self is None

Casts &self to Option<&Decoder>

Casts &mut self to Option<&mut Decoder>

Casts self to Decoder. Panics if self is None

Implementors