pub enum MessagingErr<T> {
SendErr(T),
ChannelClosed,
InvalidActorType,
}Expand description
A messaging error has occurred
Variants§
SendErr(T)
The channel you’re trying to send a message too has been dropped/closed. If you’re sending to an crate::ActorCell then that means the actor has died (failure or not).
Includes the message which failed to send so the caller can perform another operation with the message if they want to.
ChannelClosed
The channel you’re trying to receive from has had all the senders dropped and is therefore closed
InvalidActorType
Tried to send a message to an actor with an invalid actor type defined. This happens if you have an crate::ActorCell which has the type id of its handler and you try to use an alternate handler to send a message
Implementations§
Source§impl<T> MessagingErr<T>
impl<T> MessagingErr<T>
Sourcepub fn map<F, U>(self, mapper: F) -> MessagingErr<U>where
F: FnOnce(T) -> U,
pub fn map<F, U>(self, mapper: F) -> MessagingErr<U>where
F: FnOnce(T) -> U,
Map any message embedded within the error type. This is primarily useful for normalizing an error value if the message is not needed.
Trait Implementations§
Source§impl<T> Debug for MessagingErr<T>
impl<T> Debug for MessagingErr<T>
Source§impl<T> Display for MessagingErr<T>
impl<T> Display for MessagingErr<T>
Source§impl<T> Error for MessagingErr<T>
impl<T> Error for MessagingErr<T>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl<T> From<MessagingErr<T>> for RactorErr<T>
impl<T> From<MessagingErr<T>> for RactorErr<T>
Source§fn from(value: MessagingErr<T>) -> RactorErr<T>
fn from(value: MessagingErr<T>) -> RactorErr<T>
Source§impl<T> From<SendError<T>> for MessagingErr<T>
impl<T> From<SendError<T>> for MessagingErr<T>
Source§fn from(e: SendError<T>) -> MessagingErr<T>
fn from(e: SendError<T>) -> MessagingErr<T>
Source§impl<T> From<TrySendError<T>> for MessagingErr<T>
impl<T> From<TrySendError<T>> for MessagingErr<T>
Source§fn from(e: TrySendError<T>) -> MessagingErr<T>
fn from(e: TrySendError<T>) -> MessagingErr<T>
impl<T> Sync for MessagingErr<T>
Auto Trait Implementations§
impl<T> Freeze for MessagingErr<T>where
T: Freeze,
impl<T> RefUnwindSafe for MessagingErr<T>where
T: RefUnwindSafe,
impl<T> Send for MessagingErr<T>where
T: Send,
impl<T> Unpin for MessagingErr<T>where
T: Unpin,
impl<T> UnwindSafe for MessagingErr<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Message for T
impl<T> Message for T
Source§fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
Source§fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.