pub trait CaseDirectory: Send + Sync {
// Required method
fn candidates<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
actor: &'life1 ActorContext,
conversation: &'life2 ConversationId,
) -> Pin<Box<dyn Future<Output = Result<Vec<CaseCandidate>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
// Provided methods
fn authorize_case<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
actor: &'life1 ActorContext,
conversation: &'life2 ConversationId,
key: &'life3 CaseKey,
) -> Pin<Box<dyn Future<Output = Result<Option<CaseCandidate>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
fn find<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
actor: &'life1 ActorContext,
conversation: &'life2 ConversationId,
workflow: &'life3 WorkflowKey,
named: Option<&'life4 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<CaseCandidate>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait { ... }
fn resolve_origin<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
actor: &'life1 ActorContext,
origin: &'life2 OriginToken,
) -> Pin<Box<dyn Future<Output = Result<Option<CaseCandidate>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
}Expand description
Names the cases an actor may address (spec §23 step D, §25.4).
Whatever it does not return, the model never learns exists. The account is the
boundary the runtime enforces; any narrower scope (an organization, a workspace)
is enforced here and nowhere else, because the executor’s load never sees the
actor. Every case a turn addresses passes through one of these methods.
Required Methods§
Sourcefn candidates<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
actor: &'life1 ActorContext,
conversation: &'life2 ConversationId,
) -> Pin<Box<dyn Future<Output = Result<Vec<CaseCandidate>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn candidates<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
actor: &'life1 ActorContext,
conversation: &'life2 ConversationId,
) -> Pin<Box<dyn Future<Output = Result<Vec<CaseCandidate>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
The cases actor may address in conversation. A record a turn created is
addressable on the next turn only when it is listed here.
§Errors
StoreError when the directory could not be read. The turn fails closed (I19).
Provided Methods§
Whether actor may address key, an existing record an open card names that
candidates did not return. None refuses, and the card
is dropped from the turn.
The default refuses, so the candidate list is the whole definition of what an actor may address. Override it when that list is deliberately narrower.
§Errors
StoreError when the lookup failed. The turn fails closed (I19).
Sourcefn find<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
actor: &'life1 ActorContext,
conversation: &'life2 ConversationId,
workflow: &'life3 WorkflowKey,
named: Option<&'life4 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<CaseCandidate>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn find<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
actor: &'life1 ActorContext,
conversation: &'life2 ConversationId,
workflow: &'life3 WorkflowKey,
named: Option<&'life4 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<CaseCandidate>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
The records of workflow the actor may address that named names, for a
message naming one candidates did not list. named is
the user’s words, when they used any. One found record is the act’s target;
several are offered on a selection card. The default finds none.
§Errors
StoreError when the lookup failed. The turn fails closed (I19).
Sourcefn resolve_origin<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
actor: &'life1 ActorContext,
origin: &'life2 OriginToken,
) -> Pin<Box<dyn Future<Output = Result<Option<CaseCandidate>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn resolve_origin<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
actor: &'life1 ActorContext,
origin: &'life2 OriginToken,
) -> Pin<Box<dyn Future<Output = Result<Option<CaseCandidate>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
The record a server-issued origin token names (spec §12.4). The default recognises none.
§Errors
StoreError when the lookup failed.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".