Skip to main content

OptionMetaExt

Trait OptionMetaExt 

Source
pub trait OptionMetaExt<T> {
    // Required methods
    fn inner(&self) -> Option<&T>;
    fn meta_span(&self) -> Option<Span>;
}
Expand description

Extension trait for Option<Meta<T>> to make access more ergonomic.

Required Methods§

Source

fn inner(&self) -> Option<&T>

Get the inner value by reference if present.

Source

fn meta_span(&self) -> Option<Span>

Get the span if the Meta is present.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> OptionMetaExt<T> for Option<Meta<T>>

Source§

fn inner(&self) -> Option<&T>

Source§

fn meta_span(&self) -> Option<Span>

Implementors§