Skip to main content

LashSession

Struct LashSession 

Source
pub struct LashSession { /* private fields */ }

Implementations§

Source§

impl LashSession

Source

pub async fn close(self) -> Result<()>

Source

pub fn session_id(&self) -> String

Source

pub fn policy_snapshot(&self) -> SessionPolicy

Source

pub fn observe(&self) -> ObservableSession

Source

pub fn parent_session_id(&self) -> Option<&str>

Source

pub fn effect_host(&self) -> Arc<dyn EffectHost>

Source

pub fn turn(&self, input: TurnInput) -> TurnBuilder

Source

pub fn queued_turn(&self) -> QueuedTurnBuilder

Source

pub fn cancel_running_turns(&self) -> usize

Cancel every turn currently executing through this opened session (including its clones) and report how many were signalled.

This is the affordance behind a UI “stop” control: hold a clone of the session wherever the stop arrives and call this, instead of threading a CancellationToken into every turn call (TurnBuilder::cancel remains the per-turn hook when you need one). A cancelled turn finishes with TurnOutcome::Stopped(TurnStop::Cancelled) and commits like any other turn; the session stays usable.

Scope: turns started from this LashSession instance and its clones. A handle opened separately for the same session id has its own registry and is not reached.

Source

pub fn admin(&self) -> SessionAdmin

Source

pub async fn configure(&self, patch: SessionConfigPatch) -> Result<()>

Source

pub fn tools(&self) -> ToolAdmin

Source

pub fn commands(&self) -> SessionCommandAdmin

Source

pub fn triggers(&self) -> SessionTriggerAdmin

Source

pub fn processes(&self) -> SessionProcessAdmin

Source

pub fn plugin_actions(&self) -> PluginActions

Source

pub fn enqueue(&self, input: TurnInput) -> EnqueueTurnBuilder<'_>

Source

pub async fn queued_work(&self) -> Result<Vec<QueuedWorkBatch>>

Source

pub async fn cancel_queued_work_batch( &self, batch_id: &str, ) -> Result<Option<QueuedWorkBatch>>

Source

pub async fn await_queued_work_batch(&self, batch_id: &str) -> Result<()>

Resolve once batch_id is no longer pending in the queue store — drained by whoever runs queued work (a queued-work runner, a durable worker, or another handle’s queued_turn) or cancelled. This is the enqueue-and-observe side of the queue: the caller never claims the work itself.

Completion is read from the persistent queue store, so it observes drains performed by other session handles and other processes alike. There is no built-in deadline — nothing resolves if nothing drains the queue, so bound it with tokio::time::timeout when the worker may be unavailable. A batch id the store has never seen resolves immediately.

Source

pub fn read_view(&self) -> SessionReadView

Source

pub fn usage_report(&self) -> SessionUsageReport

Source

pub async fn set_turn_phase_probe(&self, probe: Arc<dyn RuntimeTurnPhaseProbe>)

Trait Implementations§

Source§

impl Clone for LashSession

Source§

fn clone(&self) -> LashSession

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more