pub enum Error {
Actor(String),
ResourceExhausted(String),
Serialization(String),
Internal(String),
}Expand description
The error type for the actor runtime.
Deliberately small: the runtime only needs to express actor-lifecycle failures, resource exhaustion (mailbox full, quota rejected), serialization failures, and internal bugs.
Variants§
Actor(String)
An actor lifecycle or messaging error (unknown actor, stopped actor, duplicate registration, supervision failure, …).
ResourceExhausted(String)
A resource limit was hit: mailbox full, spawn rejected by the
crate::ResourcePolicy, message rate exceeded.
Serialization(String)
Serialization or deserialization failure.
Internal(String)
An internal invariant was violated (bug).
Implementations§
Source§impl Error
impl Error
Sourcepub fn actor(message: impl Into<Cow<'static, str>>) -> Self
pub fn actor(message: impl Into<Cow<'static, str>>) -> Self
An actor lifecycle or messaging error.
Sourcepub fn resource_exhausted(message: impl Into<Cow<'static, str>>) -> Self
pub fn resource_exhausted(message: impl Into<Cow<'static, str>>) -> Self
A resource exhaustion error (mailbox full, quota rejected).
Sourcepub fn serialization(message: impl Into<Cow<'static, str>>) -> Self
pub fn serialization(message: impl Into<Cow<'static, str>>) -> Self
A serialization/deserialization error.
Trait Implementations§
impl Eq for Error
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<SupervisorError> for Error
impl From<SupervisorError> for Error
Source§fn from(e: SupervisorError) -> Error
fn from(e: SupervisorError) -> Error
Converts to this type from the input type.
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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
Mutably borrows from an owned value. Read more