pub struct ActorSupervisionEvent {
pub actor_id: ActorId,
pub display_name: Option<String>,
pub occurred_at: SystemTime,
pub actor_status: ActorStatus,
pub message_headers: Option<Flattrs>,
}Expand description
This is the local actor supervision event. Child actor will propagate this event to its parent.
Fields§
§actor_id: ActorIdThe actor id of the child actor where the event is triggered.
display_name: Option<String>Friendly display name, if the actor class customized it.
occurred_at: SystemTimeThe time when the event is triggered.
actor_status: ActorStatusStatus of the child actor.
message_headers: Option<Flattrs>If this event is associated with a message, the message headers.
Implementations§
Source§impl ActorSupervisionEvent
impl ActorSupervisionEvent
Sourcepub fn new(
actor_id: ActorId,
display_name: Option<String>,
actor_status: ActorStatus,
message_headers: Option<Flattrs>,
) -> Self
pub fn new( actor_id: ActorId, display_name: Option<String>, actor_status: ActorStatus, message_headers: Option<Flattrs>, ) -> Self
Create a new supervision event. Timestamp is set to the current time.
Sourcepub fn caused_by(&self) -> &ActorSupervisionEvent
pub fn caused_by(&self) -> &ActorSupervisionEvent
Walk the UnhandledSupervisionEvent chain to the root-cause
event — the first event whose status is not
UnhandledSupervisionEvent.
Sourcepub fn actually_failing_actor(&self) -> Option<&ActorSupervisionEvent>
pub fn actually_failing_actor(&self) -> Option<&ActorSupervisionEvent>
Walk the UnhandledSupervisionEvent chain to find the root-cause
actor that originally failed.
Returns None if the event is not a failure. Always returns the
leaf of the chain — the actor whose status is the root cause,
even if that leaf is a non-failure (e.g. a stopped process).
Sourcepub fn failure_report(&self) -> Option<String>
pub fn failure_report(&self) -> Option<String>
Produce a concise failure report. Returns None for non-failure
events.
Trait Implementations§
Source§impl Clone for ActorSupervisionEvent
impl Clone for ActorSupervisionEvent
Source§fn clone(&self) -> ActorSupervisionEvent
fn clone(&self) -> ActorSupervisionEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ActorSupervisionEvent
impl Debug for ActorSupervisionEvent
Source§impl<'de> Deserialize<'de> for ActorSupervisionEvent
impl<'de> Deserialize<'de> for ActorSupervisionEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for ActorSupervisionEvent
impl Display for ActorSupervisionEvent
Source§impl Error for ActorSupervisionEvent
impl Error for ActorSupervisionEvent
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 Named for ActorSupervisionEvent
impl Named for ActorSupervisionEvent
Source§fn typename() -> &'static str
fn typename() -> &'static str
Source§fn typehash() -> u64
fn typehash() -> u64
Source§fn typeid() -> TypeId
fn typeid() -> TypeId
Source§fn port() -> u64
fn port() -> u64
Source§impl PartialEq for ActorSupervisionEvent
impl PartialEq for ActorSupervisionEvent
Source§impl Serialize for ActorSupervisionEvent
impl Serialize for ActorSupervisionEvent
impl Eq for ActorSupervisionEvent
Auto Trait Implementations§
impl Freeze for ActorSupervisionEvent
impl RefUnwindSafe for ActorSupervisionEvent
impl Send for ActorSupervisionEvent
impl Sync for ActorSupervisionEvent
impl Unpin for ActorSupervisionEvent
impl UnwindSafe for ActorSupervisionEvent
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<A, M> Handler<IndexedErasedUnbound<M>> for A
impl<A, M> Handler<IndexedErasedUnbound<M>> for A
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> QuoteExt for Twhere
T: ?Sized,
impl<T> QuoteExt for Twhere
T: ?Sized,
fn push_quoted<'q, Q, S>(&mut self, _q: Q, s: S)where
Q: QuoteInto<T>,
S: Into<Quotable<'q>>,
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
§impl<T> ToSmolStr for T
impl<T> ToSmolStr for T
fn to_smolstr(&self) -> SmolStr
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.