pub type Result<T> = Result<T, ErrorCode>;Aliased Type§
pub enum Result<T> {
Ok(T),
Err(ErrorCode),
}Variants§
Trait Implementations§
Source§impl<T> ApiResultExt for Result<T>
impl<T> ApiResultExt for Result<T>
type Ok = T
fn into_ec(self) -> Result<T>
Source§fn retryable(self) -> Result<Option<Self::Ok>, ErrorCode>
fn retryable(self) -> Result<Option<Self::Ok>, ErrorCode>
Turns retryable errors into
None, and the Result into a std::result::Result,
making the output suitable for use with crate::misc::task::retry.Source§fn into_server_result(self) -> Result<Self::Ok>
fn into_server_result(self) -> Result<Self::Ok>
When passing along a result from another server to a client, this method is called
to modify any ErrorCode. For details, see ErrorCode::into_server_error.