Trait emacs::ResultExt [−][src]
pub trait ResultExt<T, E> {
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
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.