pub struct SpawnContext {
pub agent: Arc<Agent>,
pub tools: Arc<dyn ToolExecutor>,
pub sessions_cache: Arc<RwLock<HashMap<String, Session>>>,
pub agent_runners: Arc<RwLock<HashMap<String, AgentRunner>>>,
pub session_event_senders: Arc<RwLock<HashMap<String, Sender<AgentEvent>>>>,
pub external_child_runner: Option<Arc<dyn ExternalChildRunner>>,
pub provider_router: Option<Arc<ProviderModelRouter>>,
pub completion_handler: Option<Arc<dyn ChildCompletionHandler>>,
}Fields§
§agent: Arc<Agent>§tools: Arc<dyn ToolExecutor>§sessions_cache: Arc<RwLock<HashMap<String, Session>>>§agent_runners: Arc<RwLock<HashMap<String, AgentRunner>>>§session_event_senders: Arc<RwLock<HashMap<String, Sender<AgentEvent>>>>§external_child_runner: Option<Arc<dyn ExternalChildRunner>>§provider_router: Option<Arc<ProviderModelRouter>>§completion_handler: Option<Arc<dyn ChildCompletionHandler>>Optional application-layer completion hook. The engine still emits
SubSessionCompleted to the parent stream itself; this hook lets the
server persist parent wait state and resume the parent runner without
introducing an engine -> AppState dependency.
Trait Implementations§
Source§impl Clone for SpawnContext
impl Clone for SpawnContext
Source§fn clone(&self) -> SpawnContext
fn clone(&self) -> SpawnContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SpawnContext
impl !RefUnwindSafe for SpawnContext
impl Send for SpawnContext
impl Sync for SpawnContext
impl Unpin for SpawnContext
impl UnsafeUnpin for SpawnContext
impl !UnwindSafe for SpawnContext
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