pub struct RuntimeConfig {
pub process: StdioProcessSpec,
pub hooks: RuntimeHookConfig,
pub transport: StdioTransportConfig,
pub supervisor: SupervisorConfig,
pub rpc_response_timeout: Duration,
pub server_requests: ServerRequestConfig,
pub initialize_params: Value,
pub live_channel_capacity: usize,
pub server_request_channel_capacity: usize,
pub event_sink: Option<Arc<dyn EventSink>>,
pub event_sink_channel_capacity: usize,
pub state_projection_limits: StateProjectionLimits,
}Expand description
Full configuration for spawning a Runtime instance.
All fields are set with safe defaults via RuntimeConfig::new.
Override individual fields with builder methods.
Allocation: O(1) except event_sink which may hold heap state.
Fields§
§process: StdioProcessSpec§hooks: RuntimeHookConfig§transport: StdioTransportConfig§supervisor: SupervisorConfig§rpc_response_timeout: Duration§server_requests: ServerRequestConfig§initialize_params: Value§live_channel_capacity: usize§server_request_channel_capacity: usize§event_sink: Option<Arc<dyn EventSink>>§event_sink_channel_capacity: usize§state_projection_limits: StateProjectionLimitsImplementations§
Source§impl RuntimeConfig
impl RuntimeConfig
Sourcepub fn new(process: StdioProcessSpec) -> Self
pub fn new(process: StdioProcessSpec) -> Self
Create config with safe defaults. Allocation: one Value (JSON object). Complexity: O(1).
Sourcepub fn with_hooks(self, hooks: RuntimeHookConfig) -> Self
pub fn with_hooks(self, hooks: RuntimeHookConfig) -> Self
Override lifecycle hook configuration. Allocation: O(h), h = hook count. Complexity: O(1).
Sourcepub fn with_initialize_capabilities(
self,
capabilities: InitializeCapabilities,
) -> Self
pub fn with_initialize_capabilities( self, capabilities: InitializeCapabilities, ) -> Self
Override initialize capability switches while preserving other init params.
Trait Implementations§
Source§impl Clone for RuntimeConfig
impl Clone for RuntimeConfig
Source§fn clone(&self) -> RuntimeConfig
fn clone(&self) -> RuntimeConfig
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 RuntimeConfig
impl !RefUnwindSafe for RuntimeConfig
impl Send for RuntimeConfig
impl Sync for RuntimeConfig
impl Unpin for RuntimeConfig
impl UnsafeUnpin for RuntimeConfig
impl !UnwindSafe for RuntimeConfig
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