pub struct CliOptions {
pub transport: Transport,
pub profile: McpProfile,
pub capabilities: Vec<CapabilityName>,
pub log_stderr: bool,
}Expand description
Parsed command-line options for the MCP server.
Fields§
§transport: TransportTransport to serve on.
profile: McpProfileVisibility profile filtering the surface.
capabilities: Vec<CapabilityName>Capabilities granted to the session.
log_stderr: boolWhether to log diagnostics to stderr.
Implementations§
Source§impl CliOptions
impl CliOptions
Sourcepub fn parse() -> Result<Self>
pub fn parse() -> Result<Self>
Parses options from the process arguments (skipping the program name).
Sourcepub fn parse_from(args: impl IntoIterator<Item = String>) -> Result<Self>
pub fn parse_from(args: impl IntoIterator<Item = String>) -> Result<Self>
Parses options from an explicit argument iterator.
Trait Implementations§
Source§impl Clone for CliOptions
impl Clone for CliOptions
Source§fn clone(&self) -> CliOptions
fn clone(&self) -> CliOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CliOptions
impl Debug for CliOptions
impl Eq for CliOptions
Source§impl PartialEq for CliOptions
impl PartialEq for CliOptions
Source§fn eq(&self, other: &CliOptions) -> bool
fn eq(&self, other: &CliOptions) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CliOptions
Auto Trait Implementations§
impl Freeze for CliOptions
impl RefUnwindSafe for CliOptions
impl Send for CliOptions
impl Sync for CliOptions
impl Unpin for CliOptions
impl UnsafeUnpin for CliOptions
impl UnwindSafe for CliOptions
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