Skip to main content

ExternalError

Trait ExternalError 

Source
pub trait ExternalError {
    // Required method
    fn into_lua_err(self) -> Error;
}
Expand description

Convenience for turning an arbitrary error/displayable into an Error.

Mirrors mlua::ExternalError. &str/String become a Error::RuntimeError (matching mlua’s runtime-error semantics for string errors); other std::error::Error types become an Error::ExternalError.

Required Methods§

Source

fn into_lua_err(self) -> Error

Convert self into an Error.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<E: Into<Box<dyn StdError + Send + Sync>>> ExternalError for E