Trait IsOk

Source
pub trait IsOk: Sized {
    // Required method
    fn ok(&self) -> Result<Self, UtilesCoreError>;
}
Expand description

IsOk trait for checking if a value is Ok and returns a result of self or an error

Required Methods§

Source

fn ok(&self) -> Result<Self, UtilesCoreError>

Returns Ok if the value is Ok or an error

§Errors

Returns an error if the value is not Ok

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.

Implementors§