pub struct ObservationRelationship<P: Protocol> { /* private fields */ }Expand description
Non-authorizing identity of one accepted protocol-indexed relationship.
The protocol brand cannot be changed even when the address is shared:
ⓘ
fn wrong_protocol<P, Q>(relationship: behavior_actors::ObservationRelationship<P>, outcome: Result<behavior_actors::Exit<Q::Addr>, behavior_actors::Crash>, at: std::time::Instant) -> behavior_actors::EstablishedObservation<Q>
where P: behavior::Protocol, Q: behavior::Protocol<Addr = P::Addr>, Q::Addr: behavior::RecipientAddress {
behavior_actors::EstablishedObservation::Stopped { relationship, outcome, at }
}A read-only relationship is not a cancellation permission:
ⓘ
fn permission<P: behavior::Protocol>(relationship: behavior_actors::ObservationRelationship<P>) -> behavior_actors::ObservationAuthority<P> {
relationship
}Same-protocol terminal reports and read-only identity transfer remain valid.
pub fn stopped<P, Q>(relationship: behavior_actors::ObservationRelationship<P>, outcome: Result<behavior_actors::Exit<P::Addr>, behavior_actors::Crash>, at: std::time::Instant) -> behavior_actors::EstablishedObservation<P>
where P: behavior::Protocol, Q: behavior::Protocol<Addr = P::Addr>, P::Addr: behavior::RecipientAddress {
behavior_actors::EstablishedObservation::Stopped { relationship, outcome, at }
}pub fn retained_relationship<P: behavior::Protocol>(relationship: behavior_actors::ObservationRelationship<P>) -> behavior_actors::ObservationRelationship<P> {
relationship
}Implementations§
Source§impl<P: Protocol> ObservationRelationship<P>
impl<P: Protocol> ObservationRelationship<P>
pub fn id(&self) -> ObservationId
Sourcepub fn identity(&self) -> &Arc<ObservationId>
pub fn identity(&self) -> &Arc<ObservationId>
Borrow the strong accepted identity for exact runtime membership checks.
Reading or cloning this Arc confers no cancellation permission and cannot reconstruct or rebrand a relationship.
Trait Implementations§
Source§impl<P: Protocol> Clone for ObservationRelationship<P>
impl<P: Protocol> Clone for ObservationRelationship<P>
Source§impl<P: Protocol> Debug for ObservationRelationship<P>
impl<P: Protocol> Debug for ObservationRelationship<P>
Source§impl<P: Protocol> PartialEq for ObservationRelationship<P>
impl<P: Protocol> PartialEq for ObservationRelationship<P>
impl<P: Protocol> Eq for ObservationRelationship<P>
Auto Trait Implementations§
impl<P> Freeze for ObservationRelationship<P>
impl<P> RefUnwindSafe for ObservationRelationship<P>
impl<P> Send for ObservationRelationship<P>
impl<P> Sync for ObservationRelationship<P>
impl<P> Unpin for ObservationRelationship<P>
impl<P> UnsafeUnpin for ObservationRelationship<P>
impl<P> UnwindSafe for ObservationRelationship<P>
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