pub trait AsErrorsResult<OkT, ErrorT> {
// Required methods
fn as_errors(self) -> Result<OkT, Errors<ErrorT>>;
fn give_or<E, ErrorRecipientT>(
self,
default: OkT,
errors: &mut ErrorRecipientT,
) -> Result<OkT, E>
where ErrorT: Into<E>,
ErrorRecipientT: ErrorRecipient<E>;
}
Required Methods§
Sourcefn give_or<E, ErrorRecipientT>(
self,
default: OkT,
errors: &mut ErrorRecipientT,
) -> Result<OkT, E>where
ErrorT: Into<E>,
ErrorRecipientT: ErrorRecipient<E>,
fn give_or<E, ErrorRecipientT>(
self,
default: OkT,
errors: &mut ErrorRecipientT,
) -> Result<OkT, E>where
ErrorT: Into<E>,
ErrorRecipientT: ErrorRecipient<E>,
If there is an error then gives it and returns the default value.
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.