futu_gateway_core/bridge/
client_identity_runtime.rs1#[derive(Clone, Copy, Debug, Eq, PartialEq)]
8pub struct ClientIdentityRuntime {
9 app_lang: i32,
10 client_type: u8,
11}
12
13impl ClientIdentityRuntime {
14 pub fn new(app_lang: i32, client_type: u8) -> Self {
15 Self {
16 app_lang,
17 client_type,
18 }
19 }
20
21 pub fn default_futunn() -> Self {
22 Self::new(0, 40)
25 }
26
27 pub fn update(&mut self, app_lang: i32, client_type: u8) {
28 self.app_lang = app_lang;
29 self.client_type = client_type;
30 }
31
32 pub fn app_lang(&self) -> i32 {
33 self.app_lang
34 }
35
36 pub fn client_type(&self) -> u8 {
37 self.client_type
38 }
39}
40
41impl Default for ClientIdentityRuntime {
42 fn default() -> Self {
43 Self::default_futunn()
44 }
45}