pub struct StdioConfig {
pub server_name: String,
pub server_version: String,
pub protocol_version: String,
pub include_debug_tool: bool,
pub log_file: Option<String>,
}Expand description
Configuration for the STDIO transport
Fields§
§server_name: StringServer name reported in initialize response
server_version: StringServer version reported in initialize response
protocol_version: StringProtocol version to advertise
include_debug_tool: boolWhether to include the allframe/debug tool
log_file: Option<String>Log file path (if set, logs go to file instead of stderr)
Implementations§
Source§impl StdioConfig
impl StdioConfig
Sourcepub fn with_debug_tool(self, enabled: bool) -> Self
pub fn with_debug_tool(self, enabled: bool) -> Self
Enable the built-in debug tool
Sourcepub fn with_server_name(self, name: impl Into<String>) -> Self
pub fn with_server_name(self, name: impl Into<String>) -> Self
Set the server name
Sourcepub fn with_log_file(self, path: impl Into<String>) -> Self
pub fn with_log_file(self, path: impl Into<String>) -> Self
Set a log file path
Trait Implementations§
Source§impl Clone for StdioConfig
impl Clone for StdioConfig
Source§fn clone(&self) -> StdioConfig
fn clone(&self) -> StdioConfig
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StdioConfig
impl Debug for StdioConfig
Auto Trait Implementations§
impl Freeze for StdioConfig
impl RefUnwindSafe for StdioConfig
impl Send for StdioConfig
impl Sync for StdioConfig
impl Unpin for StdioConfig
impl UnwindSafe for StdioConfig
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)