pub struct Motif;Expand description
Namespace of conversational motif factories.
Implementations§
Source§impl Motif
impl Motif
Sourcepub fn collect_frame<F: Frame>(id: impl Into<String>) -> StageSpec
pub fn collect_frame<F: Frame>(id: impl Into<String>) -> StageSpec
A stage that collects a typed frame’s slots (completes on captured).
Sourcepub fn say(id: impl Into<String>, text: impl Into<String>) -> StageSpec
pub fn say(id: impl Into<String>, text: impl Into<String>) -> StageSpec
A stage that announces something and advances immediately.
Sourcepub fn disclosure(
id: impl Into<String>,
ack_key: impl Into<String>,
) -> StageSpec
pub fn disclosure( id: impl Into<String>, ack_key: impl Into<String>, ) -> StageSpec
A stage that requires a disclosure acknowledgement before advancing.
Sourcepub fn confirm_then_commit(
id: impl Into<String>,
tool: impl Into<String>,
confirm_key: impl Into<String>,
) -> StageSpec
pub fn confirm_then_commit( id: impl Into<String>, tool: impl Into<String>, confirm_key: impl Into<String>, ) -> StageSpec
A confirm-before-act stage: tool is allowed here, gated behind
confirm_key, and the stage completes once tool succeeds.
Sourcepub fn identity_verification(
id: impl Into<String>,
verified_key: impl Into<String>,
) -> StageSpec
pub fn identity_verification( id: impl Into<String>, verified_key: impl Into<String>, ) -> StageSpec
An identity-verification stage: completes once verified_key is true.
Sourcepub fn handoff(id: impl Into<String>) -> StageSpec
pub fn handoff(id: impl Into<String>) -> StageSpec
A terminal handoff stage (optionally allowing a transfer tool).
Sourcepub fn faq_digression(
name: impl Into<String>,
trigger_key: impl Into<String>,
answered_key: impl Into<String>,
) -> OverlaySpec
pub fn faq_digression( name: impl Into<String>, trigger_key: impl Into<String>, answered_key: impl Into<String>, ) -> OverlaySpec
An FAQ digression: triggered by trigger_key, it answers a side question
(gated on answered_key) and resumes the main flow where it left off.
Auto Trait Implementations§
impl Freeze for Motif
impl RefUnwindSafe for Motif
impl Send for Motif
impl Sync for Motif
impl Unpin for Motif
impl UnwindSafe for Motif
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