Trait OptionExt

Source
pub(crate) trait OptionExt<T> {
    // Required method
    fn or_error(
        self,
        parser: &mut Parser<'_>,
        err: impl Fn(&mut Parser<'_>) -> Result<Diagnostic>,
    ) -> Result<T>;
}

Required Methods§

Source

fn or_error( self, parser: &mut Parser<'_>, err: impl Fn(&mut Parser<'_>) -> Result<Diagnostic>, ) -> Result<T>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> OptionExt<T> for Option<T>

Source§

fn or_error( self, parser: &mut Parser<'_>, err: impl Fn(&mut Parser<'_>) -> Result<Diagnostic>, ) -> Result<T>

Implementors§