pub struct FutuServer {
pub state: ServerState,
}Fields§
§state: ServerStateImplementations§
Source§impl FutuServer
impl FutuServer
Sourcepub(crate) async fn resolve_read_trd_account(
&self,
tool: &'static str,
req: &TrdAccReq,
req_ctx: &RequestContext<RoleServer>,
) -> Result<ResolvedTrdAccount, String>
pub(crate) async fn resolve_read_trd_account( &self, tool: &'static str, req: &TrdAccReq, req_ctx: &RequestContext<RoleServer>, ) -> Result<ResolvedTrdAccount, String>
Resolve a TrdAccReq account selector for MCP read tools.
This preserves the v1.4.103-v1.4.106 security order:
- authenticate caller with the same API key priority as the tool;
- open the gateway client;
- resolve
card_numinside the caller’s allowed account snapshot; - re-check the final
acc_idbefore dispatch.
Source§impl FutuServer
impl FutuServer
Sourcepub(crate) fn tool_err(msg: impl Display) -> Result<String, String>
pub(crate) fn tool_err(msg: impl Display) -> Result<String, String>
v1.4.58 Phase C1: 新 helper — 返 Result<String, String> 让 rmcp 自动
set top-level CallToolResult.is_error = Some(true)(对齐 MCP spec)。
迁移策略(C1/C2/C3 拆 3 commit,都进 v1.4.58 一个版本):
- C1:加此 helper + 迁移 5-10 pilot handlers
- C2:批量迁移剩余 70+ handlers
- C3:删除
Self::err/Self::wrapString hack(v1.4.42 遗留)
Client 双信号(向后兼容):
- Top-level
is_error: true(MCP spec 正确方式) - Content JSON 里仍含
{"error": msg, ...}(老 client 兼容)
rmcp IntoCallToolResult for Result<T, E> impl 自动把 Err 转成
CallToolResult { is_error: Some(true), content: [msg.into_contents()] }。
Sourcefn mcp_reject_to_json(
kind: RejectKind,
reason: String,
tool: &str,
audit_key_id: &str,
) -> String
fn mcp_reject_to_json( kind: RejectKind, reason: String, tool: &str, audit_key_id: &str, ) -> String
v1.4.106 D1 5d: MCP-specific reject translator (rich context: tool + audit_key_id).
MCP 返 JSON-encoded String (rmcp Err(String) → 自动 CallToolResult { is_error: Some(true), ... }, 见 tool_err 注释).
rich context 路径 (require_acc_read_with_acc_id / require_trading 等):
把 kind + reason + tool + audit_key_id 翻成 user-friendly
MCP error JSON. 这里保留 tool name + audit_key_id, 让 LLM agent 知道
是哪个 tool 哪把 key.
不变量 (与 v1.4.105 byte-identical):
- Unauthenticated → “API key required for {tool}: …”
- Forbidden → “API key {audit_key_id:?} forbidden: {reason}” (注意: reason 在 MCP 路径保留, 与 REST/gRPC generic 不同; MCP 是 LLM agent 调试场景, 反推风险低 + agent 需要清晰 hint 来纠正参数)
- RateLimited → “rate limit: {reason}”
- 其他 → reason
Sourcepub(crate) fn wrap_result<E: Display>(
res: Result<String, E>,
) -> Result<String, String>
pub(crate) fn wrap_result<E: Display>( res: Result<String, E>, ) -> Result<String, String>
v1.4.58 Phase C1: wrap 新版 —— 返 Result<String, String>。C2 批量迁移时使用。
Sourcepub(crate) fn result_as_str(r: &Result<String, String>) -> &str
pub(crate) fn result_as_str(r: &Result<String, String>) -> &str
v1.4.58 Phase C2: 从 Result<String, String> 抽 string content 作 &str。
用于 guard::emit_trade_outcome 等接受 &str 的 side-effect observers —
无论 Ok/Err 都有 string 可引用。
pub(crate) async fn client_or_err(&self) -> Result<Arc<FutuClient>, String>
Sourcepub(crate) async fn read_client_or_err(
&self,
tool: &'static str,
req_ctx: &RequestContext<RoleServer>,
api_key_override: Option<&str>,
acc_id: Option<u64>,
) -> Result<Arc<FutuClient>, String>
pub(crate) async fn read_client_or_err( &self, tool: &'static str, req_ctx: &RequestContext<RoleServer>, api_key_override: Option<&str>, acc_id: Option<u64>, ) -> Result<Arc<FutuClient>, String>
Common MCP read path: caller-specific guard first, then gateway client.
Used by read-only tools that do not need the returned caller snapshot for
account/card filtering. Account-specific tools still call
require_acc_read_with_acc_id directly so they can pass the same snapshot
into account locator / response filtering.
Sourcepub(crate) fn require_acc_read_with_acc_id(
&self,
tool: &'static str,
req_ctx: &RequestContext<RoleServer>,
api_key_override: Option<&str>,
acc_id: Option<u64>,
) -> Result<CallerSnapshot, String>
pub(crate) fn require_acc_read_with_acc_id( &self, tool: &'static str, req_ctx: &RequestContext<RoleServer>, api_key_override: Option<&str>, acc_id: Option<u64>, ) -> Result<CallerSnapshot, String>
v1.4.103 (codex 51 F1 / 52 F1 / 53 F1 / 54 F4 / 58 F1 — B5 + B6): per-request caller-specific scope 守卫 + acc_id 白名单 check.
旧 require_tool_scope 只看 process-wide state.authed_key (startup
捕获), HTTP 客户端带窄权限 Bearer 时 read tool 仍按 startup key 放行 —
跨账户 leak.
本方法接 req_ctx (rmcp request context) + 可选 api_key_override
(tool args 里的 api_key 字段, 与 trade write tools 一致) + 可选 acc_id,
优先级: api_key_override > HTTP Authorization Bearer > startup key.
解析得到 caller-specific KeyRecord 后:
- 检查 scope (基于 caller 的 scope, 不是 startup 的)
- 若 acc_id 提供 + caller key 有 allowed_acc_ids → 检查 acc_id ∈ allowed
stdio mode (无 Bearer) + 无 api_key_override → fall back 到 startup key 行为, 不破坏 stdio 用户体验.
返 Some(error_json) 拒绝, None 放行.
§v1.4.104 阶段 4: pipeline 委托
caller-specific KeyRecord 解析 + Bearer 不存在的 fail-closed 仍在本地
(要保留 v1.4.103 codex F4 verbose error message). scope check + acc_id
白名单 + audit emit 委托给 [futu_auth_pipeline::authenticate_request]
(跨 surface 共享: gRPC server.rs / WS ws_listener.rs / REST auth.rs 同源).
LoC 减 ~80 行, 行为与 v1.4.103 byte-identical.
Sourcepub(crate) fn require_trading(
&self,
tool: &'static str,
env: &str,
ctx: Option<CheckCtx>,
override_key: Option<&str>,
) -> Option<String>
pub(crate) fn require_trading( &self, tool: &'static str, env: &str, ctx: Option<CheckCtx>, override_key: Option<&str>, ) -> Option<String>
交易写守卫;ctx=Some 时同时做限额检查;override_key=Some 时优先用该 plaintext.
§v1.4.104 阶段 7-4: pipeline 委托
把 guard::require_trading 165 LoC 折叠为 ~70 LoC 调用 pipeline:
- legacy 2 级开关 (
enable_trading/allow_real_trading) 仍在本地 (MCP-specific, pipeline 不知 daemon 启动 flag). - per-call
override_key仍在本地 verify (保留 v1.4.103 codex F4 verbose error message: “per-call api_key invalid”). - scope check + expiry + rate gate + body-aware ctx + audit 全
委托
authenticate_request(与 4 surface unified).
Sourcepub(crate) fn require_caller_key_strict(
&self,
tool: &'static str,
override_key: Option<&str>,
) -> Result<Option<Arc<KeyRecord>>, String>
pub(crate) fn require_caller_key_strict( &self, tool: &'static str, override_key: Option<&str>, ) -> Result<Option<Arc<KeyRecord>>, String>
v1.4.105 D12 contract-hardening 补丁: 拿当前 caller 的 KeyRecord (per-call key
优先 > startup key). legacy mode (无 keys.json) 返 None.
用于 trade tool 调 resolve_acc_id_with_card_num 时获取
allowed_card_nums 做 string-level whitelist 校验.
codex round 1 F2 (P2) v1.4.105 移除老的 current_key_rec —
改用下面 require_caller_key_strict (fail-closed). 移除原因: invalid
override 时 silent fallback startup → 给 backend resolve_acc_id_with_card_num
探测 leak. legacy mode 仍由 strict helper Ok(None) 返回处理.
codex round 1 F2 (P2) v1.4.105: 在 trade write 路径里先验证 caller
key + fail-closed, 再 resolve_acc_id_with_card_num. 防 invalid
Bearer 仍触发 daemon GetAccList + 用 startup key 的 allowed_card_nums
做 resolution (探测 leakage).
与 current_key_rec 区别:
current_key_rec: invalid override → silent fallback startup key → resolve 已 side-effect.require_caller_key_strict: invalid override → 立即 Err 返 reject JSON, 绝不 fallback. 也保护 legacy mode (返 Ok(None)) 不破.
Return:
Ok(Some(rec)): caller key 已验, 用其allowed_card_nums做 resolveOk(None): scope mode 关闭 (legacy), require_trading 后续会处理Err(json_str): invalid override / no key / startup key revoked, 立即 abort
Sourcepub(crate) fn require_trading_scope_only(
&self,
tool: &'static str,
env: &str,
caller_key_rec: Option<&Arc<KeyRecord>>,
) -> Option<String>
pub(crate) fn require_trading_scope_only( &self, tool: &'static str, env: &str, caller_key_rec: Option<&Arc<KeyRecord>>, ) -> Option<String>
codex round 2 F1 (P2) v1.4.105: trade write 路径 早期 trade-scope
校验 — 在 client_or_err + resolve_acc_id_with_card_num 之前.
与 require_trading (full ctx body-aware) 区别:
require_trading: 完整 scope + acc_id whitelist + market/symbol/value- rate gate (最终 gate, 在 resolve 之后).
require_trading_scope_only: 只 verify caller key 含trade:real或trade:simulatescope. 不检查 acc_id / market / symbol / value (这些 final gate 仍由require_trading后做).
目标: 防 valid 但非-trade key (e.g. qot:read only) 触发 daemon
GetAccList + card_num resolution → 探测 not-found / ambiguous /
existence timing & messages, 之后才被 final require_trading 拒绝.
早期 scope check 让此类 key 在 resolve 之前 fail-closed.
不替代 require_trading — 只前置一个轻量 scope guard. 后续 final
gate (含 ctx) 仍跑.
Source§impl FutuServer
impl FutuServer
Sourcepub fn futu_get_quote_tool_attr() -> Tool
pub fn futu_get_quote_tool_attr() -> Tool
Generated tool metadata function for futu_get_quote
fn futu_get_quote( &self, Parameters: Parameters<SymbolReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_snapshot_tool_attr() -> Tool
pub fn futu_get_snapshot_tool_attr() -> Tool
Generated tool metadata function for futu_get_snapshot
fn futu_get_snapshot( &self, Parameters: Parameters<SymbolReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_kline_tool_attr() -> Tool
pub fn futu_get_kline_tool_attr() -> Tool
Generated tool metadata function for futu_get_kline
fn futu_get_kline( &self, Parameters: Parameters<KLineReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_orderbook_tool_attr() -> Tool
pub fn futu_get_orderbook_tool_attr() -> Tool
Generated tool metadata function for futu_get_orderbook
fn futu_get_orderbook( &self, Parameters: Parameters<OrderBookReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_ticker_tool_attr() -> Tool
pub fn futu_get_ticker_tool_attr() -> Tool
Generated tool metadata function for futu_get_ticker
fn futu_get_ticker( &self, Parameters: Parameters<TickerReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_rt_tool_attr() -> Tool
pub fn futu_get_rt_tool_attr() -> Tool
Generated tool metadata function for futu_get_rt
fn futu_get_rt( &self, Parameters: Parameters<SymbolReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_static_tool_attr() -> Tool
pub fn futu_get_static_tool_attr() -> Tool
Generated tool metadata function for futu_get_static
fn futu_get_static( &self, Parameters: Parameters<SymbolListReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_broker_tool_attr() -> Tool
pub fn futu_get_broker_tool_attr() -> Tool
Generated tool metadata function for futu_get_broker
fn futu_get_broker( &self, Parameters: Parameters<SymbolReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_list_plates_tool_attr() -> Tool
pub fn futu_list_plates_tool_attr() -> Tool
Generated tool metadata function for futu_list_plates
fn futu_list_plates( &self, Parameters: Parameters<PlateListReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_plate_stocks_tool_attr() -> Tool
pub fn futu_plate_stocks_tool_attr() -> Tool
Generated tool metadata function for futu_plate_stocks
fn futu_plate_stocks( &self, Parameters: Parameters<PlateStocksReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
pub(crate) fn market_tool_router() -> ToolRouter<Self>
Source§impl FutuServer
impl FutuServer
Sourcepub fn futu_get_capital_flow_tool_attr() -> Tool
pub fn futu_get_capital_flow_tool_attr() -> Tool
Generated tool metadata function for futu_get_capital_flow
fn futu_get_capital_flow( &self, Parameters: Parameters<CapitalFlowReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_capital_distribution_tool_attr() -> Tool
pub fn futu_get_capital_distribution_tool_attr() -> Tool
Generated tool metadata function for futu_get_capital_distribution
fn futu_get_capital_distribution( &self, Parameters: Parameters<SymbolReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_market_state_tool_attr() -> Tool
pub fn futu_get_market_state_tool_attr() -> Tool
Generated tool metadata function for futu_get_market_state
fn futu_get_market_state( &self, Parameters: Parameters<MarketStateReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_history_kline_tool_attr() -> Tool
pub fn futu_get_history_kline_tool_attr() -> Tool
Generated tool metadata function for futu_get_history_kline
fn futu_get_history_kline( &self, Parameters: Parameters<HistoryKLineReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_owner_plate_tool_attr() -> Tool
pub fn futu_get_owner_plate_tool_attr() -> Tool
Generated tool metadata function for futu_get_owner_plate
fn futu_get_owner_plate( &self, Parameters: Parameters<SymbolListReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_reference_tool_attr() -> Tool
pub fn futu_get_reference_tool_attr() -> Tool
Generated tool metadata function for futu_get_reference
fn futu_get_reference( &self, Parameters: Parameters<ReferenceReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_option_chain_tool_attr() -> Tool
pub fn futu_get_option_chain_tool_attr() -> Tool
Generated tool metadata function for futu_get_option_chain
fn futu_get_option_chain( &self, Parameters: Parameters<OptionChainReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_warrant_tool_attr() -> Tool
pub fn futu_get_warrant_tool_attr() -> Tool
Generated tool metadata function for futu_get_warrant
fn futu_get_warrant( &self, Parameters: Parameters<WarrantReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_ipo_list_tool_attr() -> Tool
pub fn futu_get_ipo_list_tool_attr() -> Tool
Generated tool metadata function for futu_get_ipo_list
fn futu_get_ipo_list( &self, Parameters: Parameters<IpoListReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_future_info_tool_attr() -> Tool
pub fn futu_get_future_info_tool_attr() -> Tool
Generated tool metadata function for futu_get_future_info
fn futu_get_future_info( &self, Parameters: Parameters<FutureInfoReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_user_security_group_tool_attr() -> Tool
pub fn futu_get_user_security_group_tool_attr() -> Tool
Generated tool metadata function for futu_get_user_security_group
fn futu_get_user_security_group( &self, Parameters: Parameters<UserSecurityGroupReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_stock_filter_tool_attr() -> Tool
pub fn futu_get_stock_filter_tool_attr() -> Tool
Generated tool metadata function for futu_get_stock_filter
fn futu_get_stock_filter( &self, Parameters: Parameters<StockFilterReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_trading_days_tool_attr() -> Tool
pub fn futu_get_trading_days_tool_attr() -> Tool
Generated tool metadata function for futu_get_trading_days
fn futu_get_trading_days( &self, Parameters: Parameters<TradingDaysReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_rehab_tool_attr() -> Tool
pub fn futu_get_rehab_tool_attr() -> Tool
Generated tool metadata function for futu_get_rehab
fn futu_get_rehab( &self, Parameters: Parameters<SymbolReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_suspend_tool_attr() -> Tool
pub fn futu_get_suspend_tool_attr() -> Tool
Generated tool metadata function for futu_get_suspend
fn futu_get_suspend( &self, Parameters: Parameters<SuspendReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_user_security_tool_attr() -> Tool
pub fn futu_get_user_security_tool_attr() -> Tool
Generated tool metadata function for futu_get_user_security
fn futu_get_user_security( &self, Parameters: Parameters<UserSecurityReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_global_state_tool_attr() -> Tool
pub fn futu_get_global_state_tool_attr() -> Tool
Generated tool metadata function for futu_get_global_state
fn futu_get_global_state( &self, Parameters: Parameters<NoArgs>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_user_info_tool_attr() -> Tool
pub fn futu_get_user_info_tool_attr() -> Tool
Generated tool metadata function for futu_get_user_info
fn futu_get_user_info( &self, Parameters: Parameters<NoArgs>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_quote_rights_tool_attr() -> Tool
pub fn futu_get_quote_rights_tool_attr() -> Tool
Generated tool metadata function for futu_get_quote_rights
fn futu_get_quote_rights( &self, Parameters: Parameters<QuoteRightsReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_delay_statistics_tool_attr() -> Tool
pub fn futu_get_delay_statistics_tool_attr() -> Tool
Generated tool metadata function for futu_get_delay_statistics
fn futu_get_delay_statistics( &self, Parameters: Parameters<NoArgs>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_token_state_tool_attr() -> Tool
pub fn futu_get_token_state_tool_attr() -> Tool
Generated tool metadata function for futu_get_token_state
fn futu_get_token_state( &self, Parameters: Parameters<NoArgs>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_risk_free_rate_tool_attr() -> Tool
pub fn futu_get_risk_free_rate_tool_attr() -> Tool
Generated tool metadata function for futu_get_risk_free_rate
fn futu_get_risk_free_rate( &self, Parameters: Parameters<NoArgs>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_spread_table_tool_attr() -> Tool
pub fn futu_get_spread_table_tool_attr() -> Tool
Generated tool metadata function for futu_get_spread_table
fn futu_get_spread_table( &self, Parameters: Parameters<NoArgs>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_ticker_statistic_tool_attr() -> Tool
pub fn futu_get_ticker_statistic_tool_attr() -> Tool
Generated tool metadata function for futu_get_ticker_statistic
fn futu_get_ticker_statistic( &self, Parameters: Parameters<TickerStatisticReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_ticker_statistic_detail_tool_attr() -> Tool
pub fn futu_get_ticker_statistic_detail_tool_attr() -> Tool
Generated tool metadata function for futu_get_ticker_statistic_detail
fn futu_get_ticker_statistic_detail( &self, Parameters: Parameters<TickerStatisticDetailReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_history_kl_quota_tool_attr() -> Tool
pub fn futu_get_history_kl_quota_tool_attr() -> Tool
Generated tool metadata function for futu_get_history_kl_quota
fn futu_get_history_kl_quota( &self, Parameters: Parameters<HistoryKlQuotaReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_holding_change_tool_attr() -> Tool
pub fn futu_get_holding_change_tool_attr() -> Tool
Generated tool metadata function for futu_get_holding_change
fn futu_get_holding_change( &self, Parameters: Parameters<HoldingChangeReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_modify_user_security_tool_attr() -> Tool
pub fn futu_modify_user_security_tool_attr() -> Tool
Generated tool metadata function for futu_modify_user_security
fn futu_modify_user_security( &self, Parameters: Parameters<ModifyUserSecurityReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_code_change_tool_attr() -> Tool
pub fn futu_get_code_change_tool_attr() -> Tool
Generated tool metadata function for futu_get_code_change
fn futu_get_code_change( &self, Parameters: Parameters<CodeChangeReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_set_price_reminder_tool_attr() -> Tool
pub fn futu_set_price_reminder_tool_attr() -> Tool
Generated tool metadata function for futu_set_price_reminder
fn futu_set_price_reminder( &self, Parameters: Parameters<SetPriceReminderReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_price_reminder_tool_attr() -> Tool
pub fn futu_get_price_reminder_tool_attr() -> Tool
Generated tool metadata function for futu_get_price_reminder
fn futu_get_price_reminder( &self, Parameters: Parameters<GetPriceReminderReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_option_expiration_date_tool_attr() -> Tool
pub fn futu_get_option_expiration_date_tool_attr() -> Tool
Generated tool metadata function for futu_get_option_expiration_date
fn futu_get_option_expiration_date( &self, Parameters: Parameters<OptionExpirationDateReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
pub(crate) fn reference_tool_router() -> ToolRouter<Self>
Source§impl FutuServer
impl FutuServer
Sourcepub fn futu_query_subscription_tool_attr() -> Tool
pub fn futu_query_subscription_tool_attr() -> Tool
Generated tool metadata function for futu_query_subscription
fn futu_query_subscription( &self, Parameters: Parameters<QuerySubscriptionReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_used_quota_tool_attr() -> Tool
pub fn futu_get_used_quota_tool_attr() -> Tool
Generated tool metadata function for futu_get_used_quota
fn futu_get_used_quota( &self, Parameters: Parameters<NoArgs>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_subscribe_tool_attr() -> Tool
pub fn futu_subscribe_tool_attr() -> Tool
Generated tool metadata function for futu_subscribe
Sourcefn futu_subscribe(
&self,
Parameters: Parameters<SubscribeReq>,
req_ctx: RequestContext<RoleServer>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
fn futu_subscribe( &self, Parameters: Parameters<SubscribeReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
v1.4.74 A1 BUG-011 fix: 加 futu_subscribe 补齐 MCP 对称性。
MCP 之前有 futu_unsubscribe / futu_sub_acc_push / futu_unsub_acc_push
/ futu_query_subscription / futu_push_subscriber_info 但缺
futu_subscribe 本身 → API 对称性被打破(“能取消但不能订阅”)。
架构:本 tool 触发 gateway 层订阅(CMD 3001 QOT_SUB),不返 push stream
本身。Push 数据通过 SSE notification 走(v1.4.58 MCP SSE basics),
客户端用 futu_push_subscriber_info 查询订阅状态。
对齐 Python SDK OpenQuoteContext.subscribe。
Sourcepub fn futu_unsubscribe_tool_attr() -> Tool
pub fn futu_unsubscribe_tool_attr() -> Tool
Generated tool metadata function for futu_unsubscribe
fn futu_unsubscribe( &self, Parameters: Parameters<UnsubscribeReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_sub_acc_push_tool_attr() -> Tool
pub fn futu_sub_acc_push_tool_attr() -> Tool
Generated tool metadata function for futu_sub_acc_push
fn futu_sub_acc_push( &self, Parameters: Parameters<SubAccPushReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_unsub_acc_push_tool_attr() -> Tool
pub fn futu_unsub_acc_push_tool_attr() -> Tool
Generated tool metadata function for futu_unsub_acc_push
fn futu_unsub_acc_push( &self, Parameters: Parameters<UnsubAccPushReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_push_subscriber_info_tool_attr() -> Tool
pub fn futu_push_subscriber_info_tool_attr() -> Tool
Generated tool metadata function for futu_push_subscriber_info
fn futu_push_subscriber_info( &self, Parameters: Parameters<NoArgs>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
pub(crate) fn subscription_tool_router() -> ToolRouter<Self>
Source§impl FutuServer
impl FutuServer
Sourcepub fn futu_ping_tool_attr() -> Tool
pub fn futu_ping_tool_attr() -> Tool
Generated tool metadata function for futu_ping
fn futu_ping( &self, Parameters: Parameters<NoArgs>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
pub(crate) fn system_tool_router() -> ToolRouter<Self>
Source§impl FutuServer
impl FutuServer
Sourcepub fn futu_list_accounts_tool_attr() -> Tool
pub fn futu_list_accounts_tool_attr() -> Tool
Generated tool metadata function for futu_list_accounts
fn futu_list_accounts( &self, Parameters: Parameters<NoArgs>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_funds_tool_attr() -> Tool
pub fn futu_get_funds_tool_attr() -> Tool
Generated tool metadata function for futu_get_funds
fn futu_get_funds( &self, Parameters: Parameters<TrdAccReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_positions_tool_attr() -> Tool
pub fn futu_get_positions_tool_attr() -> Tool
Generated tool metadata function for futu_get_positions
fn futu_get_positions( &self, Parameters: Parameters<TrdAccReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_orders_tool_attr() -> Tool
pub fn futu_get_orders_tool_attr() -> Tool
Generated tool metadata function for futu_get_orders
fn futu_get_orders( &self, Parameters: Parameters<TrdAccReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_deals_tool_attr() -> Tool
pub fn futu_get_deals_tool_attr() -> Tool
Generated tool metadata function for futu_get_deals
fn futu_get_deals( &self, Parameters: Parameters<TrdAccReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_max_trd_qtys_tool_attr() -> Tool
pub fn futu_get_max_trd_qtys_tool_attr() -> Tool
Generated tool metadata function for futu_get_max_trd_qtys
fn futu_get_max_trd_qtys( &self, Parameters: Parameters<MaxTrdQtysReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_order_fee_tool_attr() -> Tool
pub fn futu_get_order_fee_tool_attr() -> Tool
Generated tool metadata function for futu_get_order_fee
fn futu_get_order_fee( &self, Parameters: Parameters<OrderFeeReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_margin_ratio_tool_attr() -> Tool
pub fn futu_get_margin_ratio_tool_attr() -> Tool
Generated tool metadata function for futu_get_margin_ratio
fn futu_get_margin_ratio( &self, Parameters: Parameters<MarginRatioReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_history_orders_tool_attr() -> Tool
pub fn futu_get_history_orders_tool_attr() -> Tool
Generated tool metadata function for futu_get_history_orders
fn futu_get_history_orders( &self, Parameters: Parameters<HistoryQueryReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_history_deals_tool_attr() -> Tool
pub fn futu_get_history_deals_tool_attr() -> Tool
Generated tool metadata function for futu_get_history_deals
fn futu_get_history_deals( &self, Parameters: Parameters<HistoryQueryReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_acc_cash_flow_tool_attr() -> Tool
pub fn futu_get_acc_cash_flow_tool_attr() -> Tool
Generated tool metadata function for futu_get_acc_cash_flow
fn futu_get_acc_cash_flow( &self, Parameters: Parameters<AccCashFlowReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_flow_summary_tool_attr() -> Tool
pub fn futu_get_flow_summary_tool_attr() -> Tool
Generated tool metadata function for futu_get_flow_summary
Sourcefn futu_get_flow_summary(
&self,
Parameters: Parameters<AccCashFlowReq>,
req_ctx: RequestContext<RoleServer>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
fn futu_get_flow_summary( &self, Parameters: Parameters<AccCashFlowReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
v1.4.73 BUG-002 fix: MCP alias futu_get_flow_summary 指向同 handler。
eli v1.4.71 验收报告的 AI tester 列此为 P0(“MCP 58 工具无对应 futu_get_flow_summary,
有 margin_ratio / order_fee 同类查询”)。审查后发现:REST 侧两个
endpoint 并存 /api/flow-summary (原) + /api/acc-cash-flow (v1.4.51 alias),
MCP 只有 futu_get_acc_cash_flow (v1.4.30 P2 实装)。
用户期待 MCP 与 REST /api/flow-summary 同名的 tool,这是 UX 对称问题。
本 alias 保持与主 tool futu_get_acc_cash_flow 语义完全一致,
参数结构 + handler 调用 + scope 登记全部共享。
Sourcepub fn futu_get_cash_log_tool_attr() -> Tool
pub fn futu_get_cash_log_tool_attr() -> Tool
Generated tool metadata function for futu_get_cash_log
fn futu_get_cash_log( &self, Parameters: Parameters<CashLogReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_cash_detail_tool_attr() -> Tool
pub fn futu_get_cash_detail_tool_attr() -> Tool
Generated tool metadata function for futu_get_cash_detail
fn futu_get_cash_detail( &self, Parameters: Parameters<CashDetailReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_biz_group_tool_attr() -> Tool
pub fn futu_get_biz_group_tool_attr() -> Tool
Generated tool metadata function for futu_get_biz_group
fn futu_get_biz_group( &self, Parameters: Parameters<BizGroupReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_margin_info_tool_attr() -> Tool
pub fn futu_get_margin_info_tool_attr() -> Tool
Generated tool metadata function for futu_get_margin_info
fn futu_get_margin_info( &self, Parameters: Parameters<MarginInfoReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_account_flag_tool_attr() -> Tool
pub fn futu_get_account_flag_tool_attr() -> Tool
Generated tool metadata function for futu_get_account_flag
fn futu_get_account_flag( &self, Parameters: Parameters<AccountFlagReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_bond_total_asset_tool_attr() -> Tool
pub fn futu_get_bond_total_asset_tool_attr() -> Tool
Generated tool metadata function for futu_get_bond_total_asset
fn futu_get_bond_total_asset( &self, Parameters: Parameters<BondAccountReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_bond_single_asset_tool_attr() -> Tool
pub fn futu_get_bond_single_asset_tool_attr() -> Tool
Generated tool metadata function for futu_get_bond_single_asset
fn futu_get_bond_single_asset( &self, Parameters: Parameters<BondSymbolReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_bond_position_list_tool_attr() -> Tool
pub fn futu_get_bond_position_list_tool_attr() -> Tool
Generated tool metadata function for futu_get_bond_position_list
fn futu_get_bond_position_list( &self, Parameters: Parameters<BondAccountReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_bond_answer_state_tool_attr() -> Tool
pub fn futu_get_bond_answer_state_tool_attr() -> Tool
Generated tool metadata function for futu_get_bond_answer_state
fn futu_get_bond_answer_state( &self, Parameters: Parameters<BondSymbolReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_get_bond_trade_reminder_tool_attr() -> Tool
pub fn futu_get_bond_trade_reminder_tool_attr() -> Tool
Generated tool metadata function for futu_get_bond_trade_reminder
fn futu_get_bond_trade_reminder( &self, Parameters: Parameters<BondSymbolReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
pub(crate) fn trade_read_tool_router() -> ToolRouter<Self>
Source§impl FutuServer
impl FutuServer
Sourcepub fn futu_place_order_tool_attr() -> Tool
pub fn futu_place_order_tool_attr() -> Tool
Generated tool metadata function for futu_place_order
fn futu_place_order( &self, Parameters: Parameters<PlaceOrderReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_modify_order_tool_attr() -> Tool
pub fn futu_modify_order_tool_attr() -> Tool
Generated tool metadata function for futu_modify_order
fn futu_modify_order( &self, Parameters: Parameters<ModifyOrderReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_cancel_order_tool_attr() -> Tool
pub fn futu_cancel_order_tool_attr() -> Tool
Generated tool metadata function for futu_cancel_order
fn futu_cancel_order( &self, Parameters: Parameters<CancelOrderReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_reconfirm_order_tool_attr() -> Tool
pub fn futu_reconfirm_order_tool_attr() -> Tool
Generated tool metadata function for futu_reconfirm_order
fn futu_reconfirm_order( &self, Parameters: Parameters<ReconfirmOrderReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_cancel_all_order_tool_attr() -> Tool
pub fn futu_cancel_all_order_tool_attr() -> Tool
Generated tool metadata function for futu_cancel_all_order
fn futu_cancel_all_order( &self, Parameters: Parameters<CancelAllOrderReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
Sourcepub fn futu_unlock_trade_tool_attr() -> Tool
pub fn futu_unlock_trade_tool_attr() -> Tool
Generated tool metadata function for futu_unlock_trade
fn futu_unlock_trade( &self, Parameters: Parameters<UnlockTradeReq>, req_ctx: RequestContext<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + '_>>
pub(crate) fn trade_write_tool_router() -> ToolRouter<Self>
Source§impl FutuServer
impl FutuServer
pub fn new(state: ServerState) -> Self
Source§impl FutuServer
impl FutuServer
pub(crate) fn tool_router() -> ToolRouter<Self>
Trait Implementations§
Source§impl Clone for FutuServer
impl Clone for FutuServer
Source§fn clone(&self) -> FutuServer
fn clone(&self) -> FutuServer
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ServerHandler for FutuServer
impl ServerHandler for FutuServer
async fn call_tool( &self, request: CallToolRequestParams, context: RequestContext<RoleServer>, ) -> Result<CallToolResult, ErrorData>
async fn list_tools( &self, _request: Option<PaginatedRequestParams>, _context: RequestContext<RoleServer>, ) -> Result<ListToolsResult, ErrorData>
fn get_info(&self) -> ServerInfo
fn enqueue_task( &self, _request: CallToolRequestParams, _context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<CreateTaskResult, ErrorData>> + MaybeSendFuture
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 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<GetPromptResult, 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<ReadResourceResult, ErrorData>> + MaybeSendFuture
fn subscribe( &self, request: SubscribeRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn unsubscribe( &self, request: UnsubscribeRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
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 list_tasks( &self, request: Option<PaginatedRequestParams>, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<ListTasksResult, ErrorData>> + MaybeSendFuture
fn get_task_info( &self, request: GetTaskInfoParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<GetTaskResult, ErrorData>> + MaybeSendFuture
fn get_task_result( &self, request: GetTaskResultParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<GetTaskPayloadResult, ErrorData>> + MaybeSendFuture
fn cancel_task( &self, request: CancelTaskParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<CancelTaskResult, ErrorData>> + MaybeSendFuture
Auto Trait Implementations§
impl Freeze for FutuServer
impl !RefUnwindSafe for FutuServer
impl Send for FutuServer
impl Sync for FutuServer
impl Unpin for FutuServer
impl UnsafeUnpin for FutuServer
impl !UnwindSafe for FutuServer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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