pub struct ObserveEstablished<P>{ /* private fields */ }Expand description
One affine request for exact protocol-indexed termination observation.
The admitted original transfers once into its authority. Nested request lanes require separate report ingress at each structural path.
pub fn accepted_request<P>(request: behavior_actors::ObserveEstablished<P>) where P: behavior::Protocol, P::Addr: behavior::RecipientAddress {
let first = behavior_actors::ObservationAuthority::issued(request);
drop(first);
}ⓘ
pub fn accepted_request<P>(request: behavior_actors::ObserveEstablished<P>) where P: behavior::Protocol, P::Addr: behavior::RecipientAddress {
let first = behavior_actors::ObservationAuthority::issued(request);
let second = behavior_actors::ObservationAuthority::issued(request);
drop((first, second));
}fn accepts<Event, Sends: behavior::SendsFor<Event>>() {}
pub fn independent_acknowledgements<P>() where P: behavior::Protocol, P::Addr: behavior::RecipientAddress {
accepts::<behavior::EventLayer<behavior_actors::EstablishedObservation<P>, behavior::EventLayer<behavior_actors::EstablishedObservation<P>, behavior::User<P::Addr, P::Msg>>>, behavior::SendLayer<behavior::InterpreterRequests<behavior_actors::CancelObservation<P>>, behavior::SendLayer<behavior::InterpreterRequests<behavior_actors::ObserveEstablished<P>>, Vec<behavior::Never>>>>();
}ⓘ
fn accepts<Event, Sends: behavior::SendsFor<Event>>() {}
pub fn independent_acknowledgements<P>() where P: behavior::Protocol, P::Addr: behavior::RecipientAddress {
accepts::<behavior::EventLayer<behavior_actors::EstablishedObservation<P>, behavior::User<P::Addr, P::Msg>>, behavior::SendLayer<behavior::InterpreterRequests<behavior_actors::CancelObservation<P>>, behavior::SendLayer<behavior::InterpreterRequests<behavior_actors::ObserveEstablished<P>>, Vec<behavior::Never>>>>();
}A request remains affine and cannot be cloned:
pub fn transfer<P>(request: behavior_actors::ObserveEstablished<P>) -> behavior_actors::ObserveEstablished<P> where P: behavior::Protocol, P::Addr: behavior::RecipientAddress { request }ⓘ
pub fn transfer<P>(request: behavior_actors::ObserveEstablished<P>) -> behavior_actors::ObserveEstablished<P> where P: behavior::Protocol, P::Addr: behavior::RecipientAddress { request.clone() }Reading a relationship cannot reconstruct its old request identity:
pub fn new_request<P>(relationship: behavior_actors::ObservationRelationship<P>, recipient: behavior::EstablishedRecipient<P>) -> behavior_actors::ObserveEstablished<P> where P: behavior::Protocol, P::Addr: behavior::RecipientAddress { behavior_actors::ObserveEstablished::new(relationship.id(), recipient) }ⓘ
pub fn old_request<P>(relationship: behavior_actors::ObservationRelationship<P>, recipient: behavior::EstablishedRecipient<P>) -> behavior_actors::ObserveEstablished<P> where P: behavior::Protocol, P::Addr: behavior::RecipientAddress { behavior_actors::ObserveEstablished { correlation: relationship.identity().clone(), recipient } }Implementations§
Source§impl<P> ObserveEstablished<P>
impl<P> ObserveEstablished<P>
Sourcepub fn new(id: ObservationId, recipient: EstablishedRecipient<P>) -> Self
pub fn new(id: ObservationId, recipient: EstablishedRecipient<P>) -> Self
Construct one affine request with a fresh private correlation.
Issue the request outside Behavior folds, then transfer the whole original into its owning Actions lane. A never-accepted rejected original may be transferred again; new construction has fresh identity.
pub fn id(&self) -> ObservationId
Sourcepub fn into_inputs(self) -> (ObservationId, EstablishedRecipient<P>)
pub fn into_inputs(self) -> (ObservationId, EstablishedRecipient<P>)
Discharge this request correlation and recover the original inputs.
pub fn interpret<I>(self, interpreter: &mut I) -> I::Outputwhere
I: InterpretEstablishedObservation<P>,
pub fn settle<I>(
self,
interpreter: &mut I,
) -> ItemSettlement<Self, (), Never, Never>where
I: InterpretEstablishedObservation<P, Output = ()>,
Trait Implementations§
Source§impl<P> ActionItem for ObserveEstablished<P>
impl<P> ActionItem for ObserveEstablished<P>
type Custody = (Option<ObserveEstablished<P>>, Option<<ObserveEstablished<P> as ActionItem>::Reply>)
type Input<'a> = &'a mut Option<ObserveEstablished<P>> where Self: 'a
type Reply = ItemSettlement<ObserveEstablished<P>, <ObserveEstablished<P> as ActionItem>::Accepted, <ObserveEstablished<P> as ActionItem>::Rejection, <ObserveEstablished<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> InterpreterRequest for ObserveEstablished<P>
impl<P> InterpreterRequest for ObserveEstablished<P>
Auto Trait Implementations§
impl<P> Freeze for ObserveEstablished<P>where
<P as Protocol>::Addr: Sized,
<<P as Protocol>::Addr as RecipientAddress>::Established<P>: Freeze,
impl<P> RefUnwindSafe for ObserveEstablished<P>where
<P as Protocol>::Addr: Sized,
<<P as Protocol>::Addr as RecipientAddress>::Established<P>: RefUnwindSafe,
impl<P> Send for ObserveEstablished<P>where
<P as Protocol>::Addr: Sized,
<<P as Protocol>::Addr as RecipientAddress>::Established<P>: Send,
impl<P> Sync for ObserveEstablished<P>where
<P as Protocol>::Addr: Sized,
<<P as Protocol>::Addr as RecipientAddress>::Established<P>: Sync,
impl<P> Unpin for ObserveEstablished<P>where
<P as Protocol>::Addr: Sized,
<<P as Protocol>::Addr as RecipientAddress>::Established<P>: Unpin,
impl<P> UnsafeUnpin for ObserveEstablished<P>where
<P as Protocol>::Addr: Sized,
<<P as Protocol>::Addr as RecipientAddress>::Established<P>: UnsafeUnpin,
impl<P> UnwindSafe for ObserveEstablished<P>where
<P as Protocol>::Addr: Sized,
<<P as Protocol>::Addr as RecipientAddress>::Established<P>: 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
Mutably borrows from an owned value. Read more