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
fn as_decoder(&self) -> Option<&Decoder>
fn as_decoder(&self) -> Option<&Decoder>
Casts &self to Option<&Decoder>
fn as_decoder_mut(&mut self) -> Option<&mut Decoder>
fn as_decoder_mut(&mut self) -> Option<&mut Decoder>
Casts &mut self to Option<&mut Decoder>
fn into_decoder(self) -> Decoder
fn into_decoder(self) -> Decoder
Casts self to Decoder. Panics if self is None