pub trait InteractionReader: Send + Sync {
// Required methods
fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
account: &'life1 AccountId,
id: &'life2 InteractionId,
) -> Pin<Box<dyn Future<Output = Result<InteractionRecord, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn list_open_for_conversation<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
account: &'life1 AccountId,
conversation: &'life2 ConversationId,
) -> Pin<Box<dyn Future<Output = Result<Vec<Interaction>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn list_open_for_case<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
account: &'life1 AccountId,
case_key: &'life2 CaseKey,
) -> Pin<Box<dyn Future<Output = Result<Vec<Interaction>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn blocking_answered_at<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
account: &'life1 AccountId,
case_key: &'life2 CaseKey,
revision: CaseRevision,
) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
The read half of the interaction contract.
It answers what cards exist and what they say, and can create, resolve,
invalidate or expire none of them. This is the half the plan-only path of
turnframe-runtime holds, which is why
a shadow turn cannot leave a card a real user could click.
Required Methods§
Sourcefn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
account: &'life1 AccountId,
id: &'life2 InteractionId,
) -> Pin<Box<dyn Future<Output = Result<InteractionRecord, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
account: &'life1 AccountId,
id: &'life2 InteractionId,
) -> Pin<Box<dyn Future<Output = Result<InteractionRecord, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sourcefn list_open_for_conversation<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
account: &'life1 AccountId,
conversation: &'life2 ConversationId,
) -> Pin<Box<dyn Future<Output = Result<Vec<Interaction>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_open_for_conversation<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
account: &'life1 AccountId,
conversation: &'life2 ConversationId,
) -> Pin<Box<dyn Future<Output = Result<Vec<Interaction>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Lists the open (Active or Resolving) interactions of a conversation,
ordered by created_at then id.
§Errors
StoreErrorwhen the listing could not be read.
Sourcefn list_open_for_case<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
account: &'life1 AccountId,
case_key: &'life2 CaseKey,
) -> Pin<Box<dyn Future<Output = Result<Vec<Interaction>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_open_for_case<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
account: &'life1 AccountId,
case_key: &'life2 CaseKey,
) -> Pin<Box<dyn Future<Output = Result<Vec<Interaction>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Lists the open (Active or Resolving) interactions of a case, ordered
by created_at then id.
§Errors
StoreErrorwhen the listing could not be read.
Sourcefn blocking_answered_at<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
account: &'life1 AccountId,
case_key: &'life2 CaseKey,
revision: CaseRevision,
) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn blocking_answered_at<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
account: &'life1 AccountId,
case_key: &'life2 CaseKey,
revision: CaseRevision,
) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Whether a blocking card of case_key bound to revision has already
been answered by the user.
§The loop this ends
A ConfirmCommand payload must offer a way to decline, and declining
ends the card without effect. Nothing is written, the case does not
move, and on the next turn the projection declares the same requirement
and the same card goes back up. The user presses “not now” and is asked
again, for ever.
The domain cannot see this: a projector reads state, and a decline leaves none. The runtime can, because a requirement belongs to a case at a revision, and “not now” means “ask me when the document changes”. A card answered at the revision the case is still on has been answered.
Answered is Resolved, Declined or Dismissed — the three the user
causes. A card the case outgrew (Invalidated) or that timed out
(Expired) was not answered by anybody, and a requirement still standing
after one is raised again as it always was.
§Errors
StoreErrorwhen the lookup could not be read.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".