Skip to main content

ReThrow

Trait ReThrow 

Source
pub trait ReThrow {
    // Required method
    fn re_throw(self) -> !;
}
Expand description

A type that can re-throw itself as a contract exception or fault.

Required Methods§

Source

fn re_throw(self) -> !

Re-throw this error. Exceptions are propagated as exceptions; faults panic (a fault stays a fault).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ReThrow for Infallible

Source§

fn re_throw(self) -> !

Implementors§

Source§

impl ReThrow for CallingError

Result<T, CallingError>::or_re_throw() aborts with the typed LibraryExn::Calling exception (client-side interface path).

Source§

impl ReThrow for LibraryExn

Result<T, LibraryExn>::or_re_throw() aborts with the contained library exception (typed, decodable by selector) rather than a fault.

Source§

impl ReThrow for RawException

Source§

impl ReThrow for RawExceptionRef<'_>

Re-throw to our caller: abort with the original wire bytes, verbatim. No additional guest buffer; the return syscall still copies bytes to the host. This is what plain (non-try_) generated methods do.

Source§

impl<X: ReThrow> ReThrow for RawCallError<X>