Trait forest_actor::util::ActorDowncast
source · [−]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>;
}
Expand description
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
fn downcast_default(
self,
default_exit_code: ExitCode,
msg: impl AsRef<str>
) -> ActorError
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
fn downcast_fatal(self, msg: impl AsRef<str>) -> ActorError
Downcast a dynamic std Error into an ActorError
. If the error cannot be downcasted
then it will convert the error into a fatal error.