pub struct FutuServer {
pub state: ServerState,
}Fields§
§state: ServerStateImplementations§
Source§impl FutuServer
impl FutuServer
pub fn new(state: ServerState) -> Self
fn err(msg: impl Display) -> String
fn wrap<E: Display>(res: Result<String, E>) -> String
async fn client_or_err(&self) -> Result<Arc<FutuClient>, String>
Sourcefn require_tool_scope(&self, tool: &'static str) -> Option<String>
fn require_tool_scope(&self, tool: &'static str) -> Option<String>
只读工具的 scope 守卫(基于中央注册表 guard::scope_for_tool);
若 tool 未登记则 fail-closed 拒绝。返回 Some(错误 JSON) 表示被拒绝。
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) -> Pin<Box<dyn Future<Output = String> + Send + '_>>
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>, ) -> Pin<Box<dyn Future<Output = 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>, ) -> Pin<Box<dyn Future<Output = 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>, ) -> Pin<Box<dyn Future<Output = 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>, ) -> Pin<Box<dyn Future<Output = 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>, ) -> Pin<Box<dyn Future<Output = 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>, ) -> Pin<Box<dyn Future<Output = 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>, ) -> Pin<Box<dyn Future<Output = 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>, ) -> Pin<Box<dyn Future<Output = 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>, ) -> Pin<Box<dyn Future<Output = 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>, ) -> Pin<Box<dyn Future<Output = String> + Send + '_>>
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, ) -> Pin<Box<dyn Future<Output = 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>, ) -> Pin<Box<dyn Future<Output = 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>, ) -> Pin<Box<dyn Future<Output = 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>, ) -> Pin<Box<dyn Future<Output = 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>, ) -> Pin<Box<dyn Future<Output = String> + Send + '_>>
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 = 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 = 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 = String> + Send + '_>>
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 more