pub struct SessionSpawnOpts {
pub session_id: String,
pub sdk_url: String,
pub access_token: String,
pub use_ccr_v2: bool,
pub worker_epoch: Option<u64>,
pub on_first_user_message: Option<Arc<dyn Fn(String) + Send + Sync>>,
}Expand description
Session spawn options
Fields§
§session_id: String§sdk_url: String§access_token: String§use_ccr_v2: boolWhen true, spawn the child with CCR v2 env vars
worker_epoch: Option<u64>Required when useCcrV2 is true. Obtained from POST /worker/register.
on_first_user_message: Option<Arc<dyn Fn(String) + Send + Sync>>Fires once with the text of the first real user message seen
Trait Implementations§
Source§impl Clone for SessionSpawnOpts
impl Clone for SessionSpawnOpts
Source§fn clone(&self) -> SessionSpawnOpts
fn clone(&self) -> SessionSpawnOpts
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 SessionSpawnOpts
impl !RefUnwindSafe for SessionSpawnOpts
impl Send for SessionSpawnOpts
impl Sync for SessionSpawnOpts
impl Unpin for SessionSpawnOpts
impl UnsafeUnpin for SessionSpawnOpts
impl !UnwindSafe for SessionSpawnOpts
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