pub trait SubError<T> {
// Required method
fn to_super_error(self) -> T;
}Expand description
Represents an error that can be upcasted to a different error type.
If type A implements SubError<B>, that means that B contains all
variants that A has, and as such A can be converted to B.
This trait powers the #[throws] and define_error!() macros.
It’s implemented by all error types they generate and required for suberrors
declared with the break keyword.
Required Methods§
Sourcefn to_super_error(self) -> T
fn to_super_error(self) -> T
Upcasts this error to a super type.