pub struct CancelObservation<P: Protocol> { /* private fields */ }Expand description
One affine attempt to cancel the exact accepted relationship.
Cancellation acknowledgements require their own typed report ingress.
fn accepts<Event, Sends: behavior::SendsFor<Event>>() {}
pub fn cancellation_acknowledgement<P>() where P: behavior::Protocol, P::Addr: behavior::RecipientAddress {
accepts::<behavior::EventLayer<behavior_actors::EstablishedObservation<P>, behavior::User<P::Addr, P::Msg>>, behavior::InterpreterRequests<behavior_actors::CancelObservation<P>>>();
}ⓘ
fn accepts<Event, Sends: behavior::SendsFor<Event>>() {}
pub fn cancellation_acknowledgement<P>() where P: behavior::Protocol, P::Addr: behavior::RecipientAddress {
accepts::<behavior::User<P::Addr, P::Msg>, behavior::InterpreterRequests<behavior_actors::CancelObservation<P>>>();
}Implementations§
Source§impl<P: Protocol> CancelObservation<P>
impl<P: Protocol> CancelObservation<P>
pub fn new(authority: ObservationAuthority<P>) -> Self
pub fn id(&self) -> ObservationId
pub fn relationship(&self) -> &ObservationRelationship<P>
Recover the same permission from an unconsumed cancellation request.
Sourcepub fn into_relationship(self) -> ObservationRelationship<P>
pub fn into_relationship(self) -> ObservationRelationship<P>
Consume permission and retain the exact non-authorizing receipt.
pub fn interpret<I>(self, interpreter: &mut I) -> I::Output
pub fn settle<I>( self, interpreter: &mut I, ) -> ItemSettlement<Self, (), Never, Never>
Trait Implementations§
Source§impl<P: Protocol> ActionItem for CancelObservation<P>where
P::Addr: RecipientAddress,
impl<P: Protocol> ActionItem for CancelObservation<P>where
P::Addr: RecipientAddress,
type Custody = (Option<CancelObservation<P>>, Option<<CancelObservation<P> as ActionItem>::Reply>)
type Input<'a> = &'a mut Option<CancelObservation<P>> where Self: 'a
type Reply = ItemSettlement<CancelObservation<P>, <CancelObservation<P> as ActionItem>::Accepted, <CancelObservation<P> as ActionItem>::Rejection, <CancelObservation<P> as ActionItem>::Prerequisite>
type Accepted = ()
type Rejection = Never
type Prerequisite = Never
fn prepare_interpretation( progress: &mut Option<InterpretationProgress<Self, Self::Custody, Self::Reply>>, )
fn interpretation_input<'a>(
custody: &'a mut Self::Custody,
) -> Option<(Self::Input<'a>, &'a mut Option<Self::Reply>)>where
Self: 'a,
fn finish_interpretation( progress: &mut Option<InterpretationProgress<Self, Self::Custody, Self::Reply>>, )
Source§impl<P: Protocol> InterpreterRequest for CancelObservation<P>where
P::Addr: RecipientAddress,
impl<P: Protocol> InterpreterRequest for CancelObservation<P>where
P::Addr: RecipientAddress,
Auto Trait Implementations§
impl<P> Freeze for CancelObservation<P>
impl<P> RefUnwindSafe for CancelObservation<P>
impl<P> Send for CancelObservation<P>
impl<P> Sync for CancelObservation<P>
impl<P> Unpin for CancelObservation<P>
impl<P> UnsafeUnpin for CancelObservation<P>
impl<P> UnwindSafe for CancelObservation<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