pub struct StaticCaseDirectory { /* private fields */ }Expand description
A directory with a fixed list, for tests, examples and single-case surfaces.
It keeps the default authorize_case, so the list
is the whole truth.
Implementations§
Source§impl StaticCaseDirectory
impl StaticCaseDirectory
Sourcepub fn with_case(self, candidate: CaseCandidate) -> Self
pub fn with_case(self, candidate: CaseCandidate) -> Self
Adds a candidate.
Sourcepub fn with_origin(self, origin: OriginToken, candidate: CaseCandidate) -> Self
pub fn with_origin(self, origin: OriginToken, candidate: CaseCandidate) -> Self
Binds an origin token to a record.
Trait Implementations§
Source§impl CaseDirectory for StaticCaseDirectory
impl CaseDirectory for StaticCaseDirectory
Source§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,
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. Read moreSource§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,
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. Read more
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. Read moreSource§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 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. Read moreSource§impl Clone for StaticCaseDirectory
impl Clone for StaticCaseDirectory
Source§impl Debug for StaticCaseDirectory
impl Debug for StaticCaseDirectory
Auto Trait Implementations§
impl Freeze for StaticCaseDirectory
impl RefUnwindSafe for StaticCaseDirectory
impl Send for StaticCaseDirectory
impl Sync for StaticCaseDirectory
impl Unpin for StaticCaseDirectory
impl UnsafeUnpin for StaticCaseDirectory
impl UnwindSafe for StaticCaseDirectory
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