pub trait FineExt<T, E> {
// Required methods
fn is_ok(&self) -> bool;
fn is_err(&self) -> bool;
fn ok(self) -> Option<T>;
fn fine(self) -> T;
fn err(self) -> Option<E>;
fn not_fine(self) -> Result<T, E>;
fn as_ref(&self) -> Fine<&T, &E>;
fn as_mut(&mut self) -> Fine<&mut T, &mut E>;
fn map<U, F>(self, op: F) -> Fine<U, E>
where F: FnOnce(T) -> U;
fn map_err<F, O>(self, op: O) -> Fine<T, F>
where O: FnOnce(E) -> F;
}Required Methods§
Sourcefn ok(self) -> Option<T>
fn ok(self) -> Option<T>
Converts from Fine<T, E> to Option<T>.
Sourcefn not_fine(self) -> Result<T, E>
fn not_fine(self) -> Result<T, E>
Converts from Fine<T, E> to Result<T, E>.
§Errors
Sourcefn as_ref(&self) -> Fine<&T, &E>
fn as_ref(&self) -> Fine<&T, &E>
Converts from &Fine<T, E> to Fine<&T, &E>.
Produces a new Fine, containing one or two references into the original, leaving the original in place.
Sourcefn as_mut(&mut self) -> Fine<&mut T, &mut E>
fn as_mut(&mut self) -> Fine<&mut T, &mut E>
Converts from &mut Fine<T, E> to Fine<&mut T, &mut E>.
Produces a new Fine, containing one or two references into the original, leaving the original in place.
Sourcefn map<U, F>(self, op: F) -> Fine<U, E>where
F: FnOnce(T) -> U,
fn map<U, F>(self, op: F) -> Fine<U, E>where
F: FnOnce(T) -> U,
Maps a Fine<T, E> to Fine<U, E>,
by unconditionally applying a function to the contained T,
leaving the Result untouched.
Sourcefn map_err<F, O>(self, op: O) -> Fine<T, F>where
O: FnOnce(E) -> F,
fn map_err<F, O>(self, op: O) -> Fine<T, F>where
O: FnOnce(E) -> F,
Maps a Fine<T, E> to Fine<T, F>,
by applying a function to a contained Err’s E,
leaving the T untouched.
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.