Skip to main content

Module error

Module error 

Source
Expand description

Defines shared error and result types.

Errors retain protocol and transport context across crate boundaries. The module also provides the macros used to construct and report them.

Re-exportsΒ§

use std::any::Any; πŸ”’
use std::borrow::Cow; πŸ”’
use std::convert::Infallible; πŸ”’
use std::io::ErrorKind as IoErrorKind; πŸ”’
use std::sync::Mutex; πŸ”’
use std::sync::PoisonError; πŸ”’
use ruma::api::error::ErrorKind as MatrixErrorKind; πŸ”’
use ruma::api::error::UnknownTokenErrorData; πŸ”’
pub use self::err::visit;
use crate::utils::assert_ref_unwind_safe; πŸ”’
use crate::utils::assert_send; πŸ”’
use crate::utils::assert_sync; πŸ”’
use crate::utils::assert_unwind_safe; πŸ”’
pub use self::log::*;

ModulesΒ§

err πŸ”’
Error construction macros
log πŸ”’
panic πŸ”’
response πŸ”’
serde πŸ”’

EnumsΒ§

Error
Unifies failures raised by the core crate.

StaticsΒ§

_IS_REF_UNWIND_SAFE πŸ”’
_IS_SEND πŸ”’
_IS_SYNC πŸ”’
_IS_UNWIND_SAFE πŸ”’

FunctionsΒ§

default_debug_log
Debug-logs an error and returns a default value.
default_log
Logs an error and returns a default value.
else_debug_log
Debug-logs an error and recovers with a default value in an infallible result.
else_log
Logs an error and recovers with a default value in an infallible result.
error_chain
Flatten an error’s source() chain into one ; caused by: string.
infallible
Marks an impossible Infallible error path.
inspect_debug_log
Logs an error’s debug representation through the debug-aware error path.
inspect_debug_log_level
Logs a debug-formatted error at the selected debug-aware tracing level.
inspect_log
Logs an error’s display representation at error level.
inspect_log_level
Logs a display-formatted error at the selected tracing level.
map_debug_log
Converts and debug-logs an error while returning the converted value.
map_log
Converts and logs an error while returning the converted value.
sanitized_message
Produces a public-safe message from an owned error.