rust_nebula/
lib.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#[cfg(feature = "graph")]
pub mod graph;

#[cfg(feature = "graph")]
pub use graph::{
    GraphTransportResponseHandler, SingleConnSession, SingleConnSessionConf,
    SingleConnSessionError, SingleConnSessionManager,
};

#[cfg(feature = "meta")]
pub mod meta;
#[cfg(feature = "meta")]
pub use self::meta::{MetaClient, MetaClientError, MetaTransportResponseHandler};

#[cfg(feature = "storage")]
pub mod storage;
#[cfg(feature = "storage")]
pub use storage::{StorageClient, StorageClientError, StorageTransportResponseHandler};

pub(crate) mod data_deserializer;
pub(crate) mod dataset_wrapper;
pub(crate) mod value_wrapper;

pub use dataset_wrapper::DataSetError;

use nebula_fbthrift_graph_v3::dependencies::common;

#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct HostAddress {
    host: String,
    port: u16,
}

impl HostAddress {
    pub fn new(host: &str, port: u16) -> Self {
        Self {
            host: host.to_string(),
            port,
        }
    }

    pub fn to_string(&self) -> String {
        format!("{}:{}", self.host, self.port)
    }
}

#[derive(PartialEq, Eq, PartialOrd, Ord, Debug, Clone)]
pub struct TimezoneInfo {}