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§
sourcefn or_signal<'e, S>(self, env: &'e Env, symbol: S) -> Result<T>where
S: IntoLispSymbol<'e>,
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.