pub enum ServeTarget {
Http {
bind: String,
tls: bool,
},
}Expand description
Where --serve-mcp binds the served self-MCP (RFC 0015 §3.1). Stdio is the
implicit default (no --serve-mcp). The sole transport is
Http — https://HOST:PORT (TLS, the control plane) or
http://LOOPBACK:PORT (plaintext, loopback-only dev/tests).
Variants§
Http
Bind an HTTP(S) listener at bind (a host:port authority). tls is the
production control plane (https://); plaintext (http://) is admitted
only for a loopback host (dev/tests).
Implementations§
Source§impl ServeTarget
impl ServeTarget
Sourcepub fn parse(spec: &str) -> Result<ServeTarget, ConfigError>
pub fn parse(spec: &str) -> Result<ServeTarget, ConfigError>
Parse a --serve-mcp value: https://host:port (or loopback
http://host:port for dev). Returns a ConfigError::Usage (exit 2,
before any side effect) on a bad scheme / missing port / a path.
Trait Implementations§
Source§impl Clone for ServeTarget
impl Clone for ServeTarget
Source§fn clone(&self) -> ServeTarget
fn clone(&self) -> ServeTarget
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 ServeTarget
impl Debug for ServeTarget
impl Eq for ServeTarget
Source§impl PartialEq for ServeTarget
impl PartialEq for ServeTarget
impl StructuralPartialEq for ServeTarget
Auto Trait Implementations§
impl Freeze for ServeTarget
impl RefUnwindSafe for ServeTarget
impl Send for ServeTarget
impl Sync for ServeTarget
impl Unpin for ServeTarget
impl UnsafeUnpin for ServeTarget
impl UnwindSafe for ServeTarget
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