pub trait FromReturnCode {
type Error;
// Required methods
fn result_from_i8(val: i8) -> Result<(), Self::Error>;
fn try_result_from_i8(val: i8) -> Option<Result<(), Self::Error>>;
// Provided method
fn try_result_from_jsvalue(val: &JsValue) -> Option<Result<(), Self::Error>> { ... }
}
Required Associated Types§
Required Methods§
fn result_from_i8(val: i8) -> Result<(), Self::Error>
fn try_result_from_i8(val: i8) -> Option<Result<(), Self::Error>>
Provided Methods§
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.