pub struct ServerControlRequestHandlers {
pub transport: Option<Box<dyn ReplBridgeTransport + Send>>,
pub session_id: String,
pub outbound_only: bool,
pub on_interrupt: Option<Arc<dyn Fn() + Send + Sync>>,
pub on_set_model: Option<Arc<dyn Fn(Option<String>) + Send + Sync>>,
pub on_set_max_thinking_tokens: Option<Arc<dyn Fn(Option<u32>) + Send + Sync>>,
pub on_set_permission_mode: Option<Arc<dyn Fn(String) -> Result<(), String> + Send + Sync>>,
}Expand description
Server control request handlers
Fields§
§transport: Option<Box<dyn ReplBridgeTransport + Send>>§session_id: String§outbound_only: boolWhen true, all mutable requests (interrupt, set_model, set_permission_mode, set_max_thinking_tokens) reply with an error instead of false-success. initialize still replies success — the server kills the connection otherwise. Used by the outbound-only bridge mode and the SDK’s /bridge subpath so claude.ai sees a proper error instead of “action succeeded but nothing happened locally”.
on_interrupt: Option<Arc<dyn Fn() + Send + Sync>>§on_set_model: Option<Arc<dyn Fn(Option<String>) + Send + Sync>>§on_set_max_thinking_tokens: Option<Arc<dyn Fn(Option<u32>) + Send + Sync>>§on_set_permission_mode: Option<Arc<dyn Fn(String) -> Result<(), String> + Send + Sync>>Auto Trait Implementations§
impl Freeze for ServerControlRequestHandlers
impl !RefUnwindSafe for ServerControlRequestHandlers
impl Send for ServerControlRequestHandlers
impl !Sync for ServerControlRequestHandlers
impl Unpin for ServerControlRequestHandlers
impl UnsafeUnpin for ServerControlRequestHandlers
impl !UnwindSafe for ServerControlRequestHandlers
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