pub struct YggMcpServer;Expand description
MCP 服务器实例(无状态:每个请求由 service_factory 新建一份)。
共享状态(DB 连接等)通过 get_conn() 全局池获取,无需在实例里持有。
工具方法分散在各 tools/*.rs 的 impl YggMcpServer 块里。
Implementations§
Source§impl YggMcpServer
impl YggMcpServer
Sourcefn combined_router() -> ToolRouter<Self>
fn combined_router() -> ToolRouter<Self>
组合所有工具组的路由表。新增工具组时在此追加一行。
Source§impl YggMcpServer
impl YggMcpServer
Sourcepub fn list_comments_tool_attr() -> Tool
pub fn list_comments_tool_attr() -> Tool
Generated tool metadata function for list_comments
Sourcefn list_comments(
&self,
Parameters: Parameters<ListCommentsParams>,
Extension: Extension<Parts>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
fn list_comments( &self, Parameters: Parameters<ListCommentsParams>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
列出评论(分页,可按状态筛选)。要求 write 作用域。
Sourcepub fn approve_comment_tool_attr() -> Tool
pub fn approve_comment_tool_attr() -> Tool
Generated tool metadata function for approve_comment
Sourcefn approve_comment(
&self,
Parameters: Parameters<CommentIdParams>,
Extension: Extension<Parts>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
fn approve_comment( &self, Parameters: Parameters<CommentIdParams>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
通过指定评论(同时递归通过所有 pending 祖先评论)。要求 write 作用域。
Sourcepub fn delete_comment_tool_attr() -> Tool
pub fn delete_comment_tool_attr() -> Tool
Generated tool metadata function for delete_comment
Sourcefn delete_comment(
&self,
Parameters: Parameters<CommentIdParams>,
Extension: Extension<Parts>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
fn delete_comment( &self, Parameters: Parameters<CommentIdParams>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
删除指定评论(软删除:设置 deleted_at 与 status=trash)。要求 write 作用域。
Sourcepub fn set_comment_status_tool_attr() -> Tool
pub fn set_comment_status_tool_attr() -> Tool
Generated tool metadata function for set_comment_status
Sourcefn set_comment_status(
&self,
Parameters: Parameters<SetCommentStatusParams>,
Extension: Extension<Parts>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
fn set_comment_status( &self, Parameters: Parameters<SetCommentStatusParams>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
设置评论状态(approved/spam/trash)。要求 write 作用域。
pub fn comments_router() -> ToolRouter<Self>
Source§impl YggMcpServer
impl YggMcpServer
Sourcepub fn upload_media_tool_attr() -> Tool
pub fn upload_media_tool_attr() -> Tool
Generated tool metadata function for upload_media
Sourcefn upload_media(
&self,
Parameters: Parameters<UploadMediaParams>,
Extension: Extension<Parts>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
fn upload_media( &self, Parameters: Parameters<UploadMediaParams>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
从一个图片 URL 抓取并入库(服务端转 WebP 若更小),返回可直接嵌入
Markdown 正文的 /uploads/... URL。要求 write 作用域。
仅接受 https:// URL;服务端做 SSRF 防护(私网/回环/保留段拒绝、
DNS 锁定防 rebinding、禁重定向、体积上限)。二进制不经 JSON-RPC。
Sourcepub fn list_assets_tool_attr() -> Tool
pub fn list_assets_tool_attr() -> Tool
Generated tool metadata function for list_assets
fn list_assets( &self, Parameters: Parameters<ListAssetsParams>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn update_asset_alt_tool_attr() -> Tool
pub fn update_asset_alt_tool_attr() -> Tool
Generated tool metadata function for update_asset_alt
fn update_asset_alt( &self, Parameters: Parameters<UpdateAssetAltParams>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn delete_asset_tool_attr() -> Tool
pub fn delete_asset_tool_attr() -> Tool
Generated tool metadata function for delete_asset
fn delete_asset( &self, Parameters: Parameters<AssetIdParams>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn batch_delete_assets_tool_attr() -> Tool
pub fn batch_delete_assets_tool_attr() -> Tool
Generated tool metadata function for batch_delete_assets
fn batch_delete_assets( &self, Parameters: Parameters<AssetIdsParams>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn purge_orphan_assets_tool_attr() -> Tool
pub fn purge_orphan_assets_tool_attr() -> Tool
Generated tool metadata function for purge_orphan_assets
fn purge_orphan_assets( &self, Parameters: Parameters<EmptyMediaParams>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn rebuild_assets_index_tool_attr() -> Tool
pub fn rebuild_assets_index_tool_attr() -> Tool
Generated tool metadata function for rebuild_assets_index
fn rebuild_assets_index( &self, Parameters: Parameters<EmptyMediaParams>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
pub fn media_router() -> ToolRouter<Self>
Source§impl YggMcpServer
impl YggMcpServer
Sourcepub fn search_knowledge_tool_attr() -> Tool
pub fn search_knowledge_tool_attr() -> Tool
Generated tool metadata function for search_knowledge
fn search_knowledge( &self, Parameters: Parameters<SearchKnowledge>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn get_note_tool_attr() -> Tool
pub fn get_note_tool_attr() -> Tool
Generated tool metadata function for get_note
fn get_note( &self, Parameters: Parameters<ReadNote>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn list_notebooks_tool_attr() -> Tool
pub fn list_notebooks_tool_attr() -> Tool
Generated tool metadata function for list_notebooks
fn list_notebooks( &self, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn get_notebook_tool_attr() -> Tool
pub fn get_notebook_tool_attr() -> Tool
Generated tool metadata function for get_notebook
fn get_notebook( &self, Parameters: Parameters<ReadNotebook>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn create_note_tool_attr() -> Tool
pub fn create_note_tool_attr() -> Tool
Generated tool metadata function for create_note
fn create_note( &self, Parameters: Parameters<NoteDraft>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn update_note_tool_attr() -> Tool
pub fn update_note_tool_attr() -> Tool
Generated tool metadata function for update_note
fn update_note( &self, Parameters: Parameters<NoteDraft>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn publish_note_tool_attr() -> Tool
pub fn publish_note_tool_attr() -> Tool
Generated tool metadata function for publish_note
fn publish_note( &self, Parameters: Parameters<ChangeNoteState>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn unpublish_note_tool_attr() -> Tool
pub fn unpublish_note_tool_attr() -> Tool
Generated tool metadata function for unpublish_note
fn unpublish_note( &self, Parameters: Parameters<ChangeNoteState>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn include_note_in_knowledge_tool_attr() -> Tool
pub fn include_note_in_knowledge_tool_attr() -> Tool
Generated tool metadata function for include_note_in_knowledge
fn include_note_in_knowledge( &self, Parameters: Parameters<ChangeNoteState>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn exclude_note_from_knowledge_tool_attr() -> Tool
pub fn exclude_note_from_knowledge_tool_attr() -> Tool
Generated tool metadata function for exclude_note_from_knowledge
fn exclude_note_from_knowledge( &self, Parameters: Parameters<ChangeNoteState>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
pub fn notes_router() -> ToolRouter<Self>
Source§impl YggMcpServer
impl YggMcpServer
Sourcepub fn list_posts_tool_attr() -> Tool
pub fn list_posts_tool_attr() -> Tool
Generated tool metadata function for list_posts
fn list_posts( &self, Parameters: Parameters<ListPostsParams>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn get_post_by_id_tool_attr() -> Tool
pub fn get_post_by_id_tool_attr() -> Tool
Generated tool metadata function for get_post_by_id
fn get_post_by_id( &self, Parameters: Parameters<PostIdParams>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn list_trashed_posts_tool_attr() -> Tool
pub fn list_trashed_posts_tool_attr() -> Tool
Generated tool metadata function for list_trashed_posts
fn list_trashed_posts( &self, Parameters: Parameters<ListPostsParams>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn restore_post_tool_attr() -> Tool
pub fn restore_post_tool_attr() -> Tool
Generated tool metadata function for restore_post
fn restore_post( &self, Parameters: Parameters<PostIdParams>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn create_post_tool_attr() -> Tool
pub fn create_post_tool_attr() -> Tool
Generated tool metadata function for create_post
fn create_post( &self, Parameters: Parameters<CreatePostParams>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Sourcepub fn update_post_tool_attr() -> Tool
pub fn update_post_tool_attr() -> Tool
Generated tool metadata function for update_post
Sourcefn update_post(
&self,
Parameters: Parameters<UpdatePostParams>,
Extension: Extension<Parts>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
fn update_post( &self, Parameters: Parameters<UpdatePostParams>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
更新指定文章(PATCH 语义:仅更新提供的字段)。要求 write 作用域。 仅文章原作者可更新。
Sourcepub fn publish_post_tool_attr() -> Tool
pub fn publish_post_tool_attr() -> Tool
Generated tool metadata function for publish_post
Sourcefn publish_post(
&self,
Parameters: Parameters<PostIdParams>,
Extension: Extension<Parts>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
fn publish_post( &self, Parameters: Parameters<PostIdParams>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
发布指定文章(设置 status=published 与 published_at)。要求 write 作用域。
Sourcepub fn trash_post_tool_attr() -> Tool
pub fn trash_post_tool_attr() -> Tool
Generated tool metadata function for trash_post
Sourcefn trash_post(
&self,
Parameters: Parameters<PostIdParams>,
Extension: Extension<Parts>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
fn trash_post( &self, Parameters: Parameters<PostIdParams>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
将指定文章移入回收站(软删除:设置 deleted_at)。要求 write 作用域。
Sourcepub fn delete_post_tool_attr() -> Tool
pub fn delete_post_tool_attr() -> Tool
Generated tool metadata function for delete_post
Sourcefn delete_post(
&self,
Parameters: Parameters<PostIdParams>,
Extension: Extension<Parts>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
fn delete_post( &self, Parameters: Parameters<PostIdParams>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
彻底删除指定文章(物理删除,不可恢复)。要求 write 作用域。
pub fn posts_router() -> ToolRouter<Self>
Source§impl YggMcpServer
impl YggMcpServer
Sourcepub fn search_posts_tool_attr() -> Tool
pub fn search_posts_tool_attr() -> Tool
Generated tool metadata function for search_posts
Sourcefn search_posts(
&self,
Parameters: Parameters<SearchPostsParams>,
Extension: Extension<Parts>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
fn search_posts( &self, Parameters: Parameters<SearchPostsParams>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
全文搜索已发布文章(知识库)。返回标题/slug/摘要/标签。
Sourcepub fn get_post_tool_attr() -> Tool
pub fn get_post_tool_attr() -> Tool
Generated tool metadata function for get_post
Sourcefn get_post(
&self,
Parameters: Parameters<GetPostParams>,
Extension: Extension<Parts>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
fn get_post( &self, Parameters: Parameters<GetPostParams>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
按 slug 取单篇已发布文章(草稿对 read 不可见)。
Generated tool metadata function for list_tags
列出全部标签 + 各自关联的已发布文章数。
pub fn read_router() -> ToolRouter<Self>
Source§impl YggMcpServer
impl YggMcpServer
Sourcepub fn run_code_tool_attr() -> Tool
pub fn run_code_tool_attr() -> Tool
Generated tool metadata function for run_code
Sourcefn run_code(
&self,
Parameters: Parameters<RunCodeParams>,
Extension: Extension<Parts>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
fn run_code( &self, Parameters: Parameters<RunCodeParams>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
在容器沙箱内执行代码并返回输出。要求 admin 作用域。
pub fn runner_router() -> ToolRouter<Self>
Source§impl YggMcpServer
impl YggMcpServer
Sourcepub fn get_settings_tool_attr() -> Tool
pub fn get_settings_tool_attr() -> Tool
Generated tool metadata function for get_settings
Sourcefn get_settings(
&self,
Parameters: Parameters<GetSettingsParams>,
Extension: Extension<Parts>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
fn get_settings( &self, Parameters: Parameters<GetSettingsParams>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
读取站点回收站设置。要求 admin 作用域。
Sourcepub fn update_settings_tool_attr() -> Tool
pub fn update_settings_tool_attr() -> Tool
Generated tool metadata function for update_settings
Sourcefn update_settings(
&self,
Parameters: Parameters<UpdateSettingsParams>,
Extension: Extension<Parts>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
fn update_settings( &self, Parameters: Parameters<UpdateSettingsParams>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
更新站点回收站设置。要求 admin 作用域。retention_days 会 clamp 到 [1, 365]。
pub fn settings_router() -> ToolRouter<Self>
Source§impl YggMcpServer
impl YggMcpServer
Sourcepub fn create_tag_tool_attr() -> Tool
pub fn create_tag_tool_attr() -> Tool
Generated tool metadata function for create_tag
Sourcefn create_tag(
&self,
Parameters: Parameters<CreateTagParams>,
Extension: Extension<Parts>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
fn create_tag( &self, Parameters: Parameters<CreateTagParams>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
创建一个新标签。若同名标签已存在则返回已有标签 id。要求 write 作用域。
Sourcepub fn rename_tag_tool_attr() -> Tool
pub fn rename_tag_tool_attr() -> Tool
Generated tool metadata function for rename_tag
Sourcefn rename_tag(
&self,
Parameters: Parameters<RenameTagParams>,
Extension: Extension<Parts>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
fn rename_tag( &self, Parameters: Parameters<RenameTagParams>, Extension: Extension<Parts>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
重命名指定标签。要求 write 作用域。
Trait Implementations§
Source§impl Clone for YggMcpServer
impl Clone for YggMcpServer
Source§fn clone(&self) -> YggMcpServer
fn clone(&self) -> YggMcpServer
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for YggMcpServer
impl Default for YggMcpServer
Source§fn default() -> YggMcpServer
fn default() -> YggMcpServer
Source§impl ServerHandler for YggMcpServer
单一 ServerHandler:工具调度委托给合并后的路由表。
router = Self::combined_router() 让 tool_handler 宏生成的
call_tool/list_tools/get_tool 全部走组合路由。
impl ServerHandler for YggMcpServer
单一 ServerHandler:工具调度委托给合并后的路由表。
router = Self::combined_router() 让 tool_handler 宏生成的
call_tool/list_tools/get_tool 全部走组合路由。
Source§async fn call_tool(
&self,
request: CallToolRequestParams,
context: RequestContext<RoleServer>,
) -> Result<CallToolResponse, ErrorData>
async fn call_tool( &self, request: CallToolRequestParams, context: RequestContext<RoleServer>, ) -> Result<CallToolResponse, ErrorData>
tools/call request from a client. Read moreasync fn list_tools( &self, _request: Option<PaginatedRequestParams>, context: RequestContext<RoleServer>, ) -> Result<ListToolsResult, ErrorData>
fn get_info(&self) -> ServerConfig
fn ping( &self, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn initialize( &self, request: InitializeRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<InitializeResult, ErrorData>> + MaybeSendFuture
§fn negotiate_initialize(
&self,
request: &InitializeRequestParams,
) -> Result<InitializeResult, ErrorData>
fn negotiate_initialize( &self, request: &InitializeRequestParams, ) -> Result<InitializeResult, ErrorData>
initialize response for request, negotiating the
protocol version against [Self::supported_protocol_versions]. Read more§fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>
fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>
§fn discover(
&self,
context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<DiscoverResult, ErrorData>> + MaybeSendFuture
fn discover( &self, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<DiscoverResult, ErrorData>> + MaybeSendFuture
fn complete( &self, request: CompleteRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<CompleteResult, ErrorData>> + MaybeSendFuture
fn set_level( &self, request: SetLevelRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn get_prompt( &self, request: GetPromptRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<GetPromptResponse, ErrorData>> + MaybeSendFuture
fn list_prompts( &self, request: Option<PaginatedRequestParams>, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<ListPromptsResult, ErrorData>> + MaybeSendFuture
fn list_resources( &self, request: Option<PaginatedRequestParams>, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<ListResourcesResult, ErrorData>> + MaybeSendFuture
fn list_resource_templates( &self, request: Option<PaginatedRequestParams>, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<ListResourceTemplatesResult, ErrorData>> + MaybeSendFuture
fn read_resource( &self, request: ReadResourceRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<ReadResourceResponse, ErrorData>> + MaybeSendFuture
§fn accepted_subscription_filter(
&self,
requested: &SubscriptionFilter,
) -> Option<SubscriptionFilter>
fn accepted_subscription_filter( &self, requested: &SubscriptionFilter, ) -> Option<SubscriptionFilter>
§fn listen(
&self,
context: SubscriptionContext,
) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn listen( &self, context: SubscriptionContext, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
§fn subscribe(
&self,
request: SubscribeRequestParams,
context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn subscribe( &self, request: SubscribeRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
resources/subscribe is legacy-only; implement accepted_subscription_filter and listen for protocol version 2026-07-28
§fn unsubscribe(
&self,
request: UnsubscribeRequestParams,
context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn unsubscribe( &self, request: UnsubscribeRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
resources/unsubscribe is legacy-only; subscriptions/listen is cancelled through its request lifecycle
fn on_custom_request( &self, request: CustomRequest, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<CustomResult, ErrorData>> + MaybeSendFuture
fn on_cancelled( &self, notification: CancelledNotificationParam, context: NotificationContext<RoleServer>, ) -> impl Future<Output = ()> + MaybeSendFuture
fn on_progress( &self, notification: ProgressNotificationParam, context: NotificationContext<RoleServer>, ) -> impl Future<Output = ()> + MaybeSendFuture
fn on_initialized( &self, context: NotificationContext<RoleServer>, ) -> impl Future<Output = ()> + MaybeSendFuture
fn on_roots_list_changed( &self, context: NotificationContext<RoleServer>, ) -> impl Future<Output = ()> + MaybeSendFuture
fn on_custom_notification( &self, notification: CustomNotification, context: NotificationContext<RoleServer>, ) -> impl Future<Output = ()> + MaybeSendFuture
§fn get_task(
&self,
request: GetTaskParams,
context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<GetTaskResult, ErrorData>> + MaybeSendFuture
fn get_task( &self, request: GetTaskParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<GetTaskResult, ErrorData>> + MaybeSendFuture
tasks/get: return the current [DetailedTask] state.§fn update_task(
&self,
request: UpdateTaskParams,
context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn update_task( &self, request: UpdateTaskParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
tasks/update: accept responses to outstanding in-task
input requests. Returns an empty acknowledgement on success.§fn cancel_task(
&self,
request: CancelTaskParams,
context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn cancel_task( &self, request: CancelTaskParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
tasks/cancel: cooperative cancellation. Returns an empty
acknowledgement; the task’s observable status may lag.§fn list_skills(
&self,
request: Option<PaginatedRequestParams>,
context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<ListSkillsResult, ErrorData>> + MaybeSendFuture
fn list_skills( &self, request: Option<PaginatedRequestParams>, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<ListSkillsResult, ErrorData>> + MaybeSendFuture
skills/list: one page of the skills this server serves.§fn get_skill(
&self,
request: GetSkillRequestParams,
context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<GetSkillResult, ErrorData>> + MaybeSendFuture
fn get_skill( &self, request: GetSkillRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<GetSkillResult, ErrorData>> + MaybeSendFuture
skills/get: the entry for one skill, or -32602 when the
server does not serve a skill at that URI.§fn read_resource_directory(
&self,
request: ReadResourceDirectoryRequestParams,
context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<ListResourcesResult, ErrorData>> + MaybeSendFuture
fn read_resource_directory( &self, request: ReadResourceDirectoryRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<ListResourcesResult, ErrorData>> + MaybeSendFuture
resources/directory/read: the direct children of a
directory resource, or -32602 when the URI is not a directory.Auto Trait Implementations§
impl Freeze for YggMcpServer
impl RefUnwindSafe for YggMcpServer
impl Send for YggMcpServer
impl Sync for YggMcpServer
impl Unpin for YggMcpServer
impl UnsafeUnpin for YggMcpServer
impl UnwindSafe for YggMcpServer
Blanket Implementations§
Source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
Source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
replaced by palette::chromatic_adaptation::AdaptIntoUnclamped
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
replaced by palette::chromatic_adaptation::AdaptIntoUnclamped
Source§impl<T, C> AdaptIntoUnclamped<T> for Cwhere
T: AdaptFromUnclamped<C>,
impl<T, C> AdaptIntoUnclamped<T> for Cwhere
T: AdaptFromUnclamped<C>,
Source§type Scalar = <T as AdaptFromUnclamped<C>>::Scalar
type Scalar = <T as AdaptFromUnclamped<C>>::Scalar
Source§fn adapt_into_unclamped_with<M>(self) -> Twhere
M: LmsToXyz<<C as AdaptIntoUnclamped<T>>::Scalar> + XyzToLms<<C as AdaptIntoUnclamped<T>>::Scalar>,
fn adapt_into_unclamped_with<M>(self) -> Twhere
M: LmsToXyz<<C as AdaptIntoUnclamped<T>>::Scalar> + XyzToLms<<C as AdaptIntoUnclamped<T>>::Scalar>,
Source§impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
Source§fn arrays_from(colors: C) -> T
fn arrays_from(colors: C) -> T
Source§impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
Source§fn arrays_into(self) -> C
fn arrays_into(self) -> C
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
Source§impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
Source§type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
parameters when converting.Source§fn cam16_into_unclamped(
self,
parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>,
) -> T
fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
Source§fn components_from(colors: C) -> T
fn components_from(colors: C) -> T
§impl<R, S> DynService<R> for Swhere
R: ServiceRole,
S: Service<R>,
impl<R, S> DynService<R> for Swhere
R: ServiceRole,
S: Service<R>,
fn handle_request( &self, request: <R as ServiceRole>::PeerReq, context: RequestContext<R>, ) -> Pin<Box<dyn Future<Output = Result<<R as ServiceRole>::Resp, ErrorData>> + Send + '_>>
fn handle_notification( &self, notification: <R as ServiceRole>::PeerNot, context: NotificationContext<R>, ) -> Pin<Box<dyn Future<Output = Result<(), ErrorData>> + Send + '_>>
fn get_info(&self) -> <R as ServiceRole>::Info
§fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>
fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>
Service::supported_protocol_versions].Source§impl<T> FromAngle<T> for T
impl<T> FromAngle<T> for T
Source§fn from_angle(angle: T) -> T
fn from_angle(angle: T) -> T
angle.§impl<E, T, Request, Encoding> FromReq<Patch<Encoding>, Request, E> for Twhere
Request: Req<E> + Send + 'static,
Encoding: Decodes<T>,
E: FromServerFnError,
impl<E, T, Request, Encoding> FromReq<Patch<Encoding>, Request, E> for Twhere
Request: Req<E> + Send + 'static,
Encoding: Decodes<T>,
E: FromServerFnError,
§impl<E, T, Request, Encoding> FromReq<Post<Encoding>, Request, E> for Twhere
Request: Req<E> + Send + 'static,
Encoding: Decodes<T>,
E: FromServerFnError,
impl<E, T, Request, Encoding> FromReq<Post<Encoding>, Request, E> for Twhere
Request: Req<E> + Send + 'static,
Encoding: Decodes<T>,
E: FromServerFnError,
§impl<E, T, Request, Encoding> FromReq<Put<Encoding>, Request, E> for Twhere
Request: Req<E> + Send + 'static,
Encoding: Decodes<T>,
E: FromServerFnError,
impl<E, T, Request, Encoding> FromReq<Put<Encoding>, Request, E> for Twhere
Request: Req<E> + Send + 'static,
Encoding: Decodes<T>,
E: FromServerFnError,
§impl<E, Encoding, Response, T> FromRes<Patch<Encoding>, Response, E> for Twhere
Response: ClientRes<E> + Send,
Encoding: Decodes<T>,
E: FromServerFnError,
impl<E, Encoding, Response, T> FromRes<Patch<Encoding>, Response, E> for Twhere
Response: ClientRes<E> + Send,
Encoding: Decodes<T>,
E: FromServerFnError,
§impl<E, Encoding, Response, T> FromRes<Post<Encoding>, Response, E> for Twhere
Response: ClientRes<E> + Send,
Encoding: Decodes<T>,
E: FromServerFnError,
impl<E, Encoding, Response, T> FromRes<Post<Encoding>, Response, E> for Twhere
Response: ClientRes<E> + Send,
Encoding: Decodes<T>,
E: FromServerFnError,
§impl<E, Encoding, Response, T> FromRes<Put<Encoding>, Response, E> for Twhere
Response: ClientRes<E> + Send,
Encoding: Decodes<T>,
E: FromServerFnError,
impl<E, Encoding, Response, T> FromRes<Put<Encoding>, Response, E> for Twhere
Response: ClientRes<E> + Send,
Encoding: Decodes<T>,
E: FromServerFnError,
Source§impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
Source§fn from_stimulus(other: U) -> T
fn from_stimulus(other: U) -> T
other into Self, while performing the appropriate scaling,
rounding and clamping.impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
impl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
Source§fn into_angle(self) -> U
fn into_angle(self) -> U
T.Source§impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
Source§type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
parameters when converting.Source§fn into_cam16_unclamped(
self,
parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>,
) -> T
fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.Source§impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
Source§fn into_color(self) -> U
fn into_color(self) -> U
Source§impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
Source§fn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
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> ⓘ
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> ⓘ
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§impl<E, T, Encoding, Request> IntoReq<Patch<Encoding>, Request, E> for Twhere
Request: ClientReq<E>,
Encoding: Encodes<T>,
E: FromServerFnError,
impl<E, T, Encoding, Request> IntoReq<Patch<Encoding>, Request, E> for Twhere
Request: ClientReq<E>,
Encoding: Encodes<T>,
E: FromServerFnError,
§impl<E, T, Encoding, Request> IntoReq<Post<Encoding>, Request, E> for Twhere
Request: ClientReq<E>,
Encoding: Encodes<T>,
E: FromServerFnError,
impl<E, T, Encoding, Request> IntoReq<Post<Encoding>, Request, E> for Twhere
Request: ClientReq<E>,
Encoding: Encodes<T>,
E: FromServerFnError,
§impl<E, T, Encoding, Request> IntoReq<Put<Encoding>, Request, E> for Twhere
Request: ClientReq<E>,
Encoding: Encodes<T>,
E: FromServerFnError,
impl<E, T, Encoding, Request> IntoReq<Put<Encoding>, Request, E> for Twhere
Request: ClientReq<E>,
Encoding: Encodes<T>,
E: FromServerFnError,
§impl<E, Response, Encoding, T> IntoRes<Patch<Encoding>, Response, E> for T
impl<E, Response, Encoding, T> IntoRes<Patch<Encoding>, Response, E> for T
§impl<E, Response, Encoding, T> IntoRes<Post<Encoding>, Response, E> for T
impl<E, Response, Encoding, T> IntoRes<Post<Encoding>, Response, E> for T
§impl<E, Response, Encoding, T> IntoRes<Put<Encoding>, Response, E> for T
impl<E, Response, Encoding, T> IntoRes<Put<Encoding>, Response, E> for T
Source§impl<T> IntoStimulus<T> for T
impl<T> IntoStimulus<T> for T
Source§fn into_stimulus(self) -> T
fn into_stimulus(self) -> T
self into T, while performing the appropriate scaling,
rounding and clamping.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> SerializableKey for T
impl<T> SerializableKey for T
§impl<H> Service<RoleServer> for Hwhere
H: ServerHandler,
impl<H> Service<RoleServer> for Hwhere
H: ServerHandler,
async fn handle_request( &self, request: <RoleServer as ServiceRole>::PeerReq, context: RequestContext<RoleServer>, ) -> Result<<RoleServer as ServiceRole>::Resp, ErrorData>
async fn handle_notification( &self, notification: <RoleServer as ServiceRole>::PeerNot, context: NotificationContext<RoleServer>, ) -> Result<(), ErrorData>
fn get_info(&self) -> <RoleServer as ServiceRole>::Info
§fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>
fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>
initialize
negotiation may agree to. Read more§impl<S> ServiceExt<RoleServer> for Swhere
S: Service<RoleServer>,
impl<S> ServiceExt<RoleServer> for Swhere
S: Service<RoleServer>,
fn serve_with_ct<T, E, A>( self, transport: T, ct: CancellationToken, ) -> impl Future<Output = Result<RunningService<RoleServer, S>, ServerInitializeError>> + MaybeSendFuture
§fn into_dyn(self) -> Box<dyn DynService<R>>
fn into_dyn(self) -> Box<dyn DynService<R>>
fn serve<T, E, A>( self, transport: T, ) -> impl Future<Output = Result<RunningService<R, Self>, <R as ServiceRole>::InitializeError>> + MaybeSendFuture
§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
§fn into_taken(self) -> T
fn into_taken(self) -> T
Source§impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
Source§type Error = <C as TryFromComponents<T>>::Error
type Error = <C as TryFromComponents<T>>::Error
try_into_colors fails to cast.Source§fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
Source§impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
Source§fn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
OutOfBounds error is returned which contains
the unclamped color. Read more