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Β§
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
Infallibleerror 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.