Trait emacs::ResultExt

source ·
pub trait ResultExt<T, E> {
    // Required method
    fn or_signal<'e, S>(self, env: &'e Env, symbol: S) -> Result<T>
       where S: IntoLispSymbol<'e>;
}
Expand description

Emacs-specific extension methods for the standard library’s Result.

Required Methods§

source

fn or_signal<'e, S>(self, env: &'e Env, symbol: S) -> Result<T>
where S: IntoLispSymbol<'e>,

Converts the error into a Lisp signal if this result is an Err. The first element of the associated signal data will be a string formatted with Display::fmt.

If the result is an Ok, it is returned unchanged.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T, E: Display> ResultExt<T, E> for Result<T, E>

source§

fn or_signal<'e, S>(self, env: &'e Env, symbol: S) -> Result<T>
where S: IntoLispSymbol<'e>,

Implementors§