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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.