pub struct SessionStartContext<'a> {
pub runtime: &'a RuntimeContext,
/* private fields */
}Expand description
Mutable state shared by the declaration-ordered SessionStart hooks.
Fields§
§runtime: &'a RuntimeContextImplementations§
Source§impl SessionStartContext<'_>
impl SessionStartContext<'_>
pub fn source(&self) -> SessionStartSource
pub fn queued_messages(&self) -> &QueuedMessageSnapshot
Sourcepub fn push_input(&mut self, item: Value)
pub fn push_input(&mut self, item: Value)
Appends hidden provider context produced while the session starts.
Sourcepub fn stop(&mut self, reason: impl Into<String>) -> Result<()>
pub fn stop(&mut self, reason: impl Into<String>) -> Result<()>
Stops the active turn after session-start processing completes.
Sourcepub fn stop_reason(&self) -> Option<&str>
pub fn stop_reason(&self) -> Option<&str>
Returns the first stop requested by the ordered middleware chain.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for SessionStartContext<'a>
impl<'a> !UnwindSafe for SessionStartContext<'a>
impl<'a> Freeze for SessionStartContext<'a>
impl<'a> Send for SessionStartContext<'a>
impl<'a> Sync for SessionStartContext<'a>
impl<'a> Unpin for SessionStartContext<'a>
impl<'a> UnsafeUnpin for SessionStartContext<'a>
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