Trait proc_macro_error::OptionExt[][src]

pub trait OptionExt {
    type Some;
    fn expect_or_abort(self, msg: &str) -> Self::Some;
}
[]

This traits expands Option with some handy shortcuts.

Associated Types

type Some[src]

Required methods

fn expect_or_abort(self, msg: &str) -> Self::Some[src][]

Behaves like Option::expect: if self is Some yield the contained value, otherwise abort macro execution via abort_call_site!. If it aborts the message will be used for compile_error! invocation.

Implementations on Foreign Types

impl<T> OptionExt for Option<T>[src][]

type Some = T

Implementors