Trait forest_actor::util::ActorDowncast[][src]

pub trait ActorDowncast {
    fn downcast_default(
        self,
        default_exit_code: ExitCode,
        msg: impl AsRef<str>
    ) -> ActorError;
fn downcast_fatal(self, msg: impl AsRef<str>) -> ActorError;
fn downcast_wrap(self, msg: impl AsRef<str>) -> Box<dyn StdError>; }

Trait to allow multiple error types to be able to be downcasted into an ActorError.

Required methods

fn downcast_default(
    self,
    default_exit_code: ExitCode,
    msg: impl AsRef<str>
) -> ActorError
[src]

Downcast a dynamic std Error into an ActorError. If the error cannot be downcasted into an ActorError automatically, use the provided ExitCode to generate a new error.

fn downcast_fatal(self, msg: impl AsRef<str>) -> ActorError[src]

Downcast a dynamic std Error into an ActorError. If the error cannot be downcasted then it will convert the error into a fatal error.

fn downcast_wrap(self, msg: impl AsRef<str>) -> Box<dyn StdError>[src]

Wrap the error with a message, without overwriting an exit code.

Loading content...

Implementations on Foreign Types

impl ActorDowncast for Box<dyn StdError>[src]

impl ActorDowncast for AmtError[src]

impl ActorDowncast for HamtError[src]

Loading content...

Implementors

Loading content...