pub struct Capabilities {
pub no_cli: bool,
pub no_mcp: bool,
pub no_http: bool,
}Expand description
Capabilities 在运行时开关通道(与 build feature 相互独立)。零值保持 全部可用。禁用通道只移除它自己的运行时路径:模式词(serve/mcp/help) 与 -v/–version 继续工作,被禁用的模式以清晰错误应答。被禁通道的 CLI()/HTTP()/MCP() 配置照常编译与运行——只是不再被消费。
Fields§
§no_cli: bool不在命令注册表上生成子命令(mcp/serve/help/-v 仍可用)。
no_mcp: boolmcp 模式不可用(stdio/http 都拒绝)。
no_http: boolserve 模式不可用。
Trait Implementations§
Source§impl Clone for Capabilities
impl Clone for Capabilities
impl Copy for Capabilities
Source§impl Debug for Capabilities
impl Debug for Capabilities
Auto Trait Implementations§
impl Freeze for Capabilities
impl RefUnwindSafe for Capabilities
impl Send for Capabilities
impl Sync for Capabilities
impl Unpin for Capabilities
impl UnsafeUnpin for Capabilities
impl UnwindSafe for Capabilities
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more