pub struct ExecutionContext {
pub session_id: TypedId<SessionIdMarker>,
pub turn_id: TypedId<TurnIdMarker>,
pub input_message_id: TypedId<MessageIdMarker>,
pub exec_id: TypedId<ExecIdMarker>,
pub workspace_id: Option<TypedId<WorkspaceIdMarker>>,
}Expand description
Correlation and resource identity for one execution phase within a turn.
Fields§
§session_id: TypedId<SessionIdMarker>Session that owns the turn.
turn_id: TypedId<TurnIdMarker>Turn containing this execution phase.
input_message_id: TypedId<MessageIdMarker>Input message that triggered the turn.
exec_id: TypedId<ExecIdMarker>Unique identifier for this execution phase.
workspace_id: Option<TypedId<WorkspaceIdMarker>>Workspace used for virtual file operations, when explicitly attached.
Implementations§
Source§impl ExecutionContext
impl ExecutionContext
Sourcepub fn new(
session_id: TypedId<SessionIdMarker>,
turn_id: TypedId<TurnIdMarker>,
input_message_id: TypedId<MessageIdMarker>,
) -> ExecutionContext
pub fn new( session_id: TypedId<SessionIdMarker>, turn_id: TypedId<TurnIdMarker>, input_message_id: TypedId<MessageIdMarker>, ) -> ExecutionContext
Create a context for the first execution phase in a turn.
Sourcepub fn with_workspace_id(
self,
workspace_id: TypedId<WorkspaceIdMarker>,
) -> ExecutionContext
pub fn with_workspace_id( self, workspace_id: TypedId<WorkspaceIdMarker>, ) -> ExecutionContext
Attach the workspace addressed by this execution.
Sourcepub fn next_exec(&self) -> ExecutionContext
pub fn next_exec(&self) -> ExecutionContext
Create a context for the next phase while preserving turn lineage.
Trait Implementations§
Source§impl Clone for ExecutionContext
impl Clone for ExecutionContext
Source§fn clone(&self) -> ExecutionContext
fn clone(&self) -> ExecutionContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExecutionContext
impl Debug for ExecutionContext
Source§impl<'de> Deserialize<'de> for ExecutionContext
impl<'de> Deserialize<'de> for ExecutionContext
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ExecutionContext, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ExecutionContext, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ExecutionContext
impl Serialize for ExecutionContext
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for ExecutionContext
impl RefUnwindSafe for ExecutionContext
impl Send for ExecutionContext
impl Sync for ExecutionContext
impl Unpin for ExecutionContext
impl UnsafeUnpin for ExecutionContext
impl UnwindSafe for ExecutionContext
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