futu_gateway_core/bridge/
subscription_runtime.rs1use std::sync::Arc;
8
9use futu_server::subscription::SubscriptionManager;
10
11#[derive(Clone)]
12pub struct SubscriptionRuntime {
13 manager: Arc<SubscriptionManager>,
14}
15
16impl SubscriptionRuntime {
17 pub fn new() -> Self {
18 Self {
19 manager: Arc::new(SubscriptionManager::new()),
20 }
21 }
22
23 pub fn manager(&self) -> Arc<SubscriptionManager> {
24 Arc::clone(&self.manager)
25 }
26}
27
28impl Default for SubscriptionRuntime {
29 fn default() -> Self {
30 Self::new()
31 }
32}