pub trait JoinToTokensError {
// Required method
fn join(self, error: impl ToTokensError + 'static) -> Error;
}Expand description
Allows to call .join(..) on any impl ToTokensError
Required Methods§
Sourcefn join(self, error: impl ToTokensError + 'static) -> Error
fn join(self, error: impl ToTokensError + 'static) -> Error
Joins two Errors
use manyhow::error_message;
error_message!("test").join(error_message!("another"));Some errors like [manyhow::Error] and [manyhow::ErrorMessage] can
also be “added”:
use manyhow::{error_message, Error};
error_message!("Hello Rust!") + error_message!("Hello 🦀!")
Error::from(error_message!("Hello Rust!")) + error_message!("Hello 🦀!")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.