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
use crate::errors::Result;
pub trait DBOptionsExt {
type DBOptions: DBOptions;
fn get_db_options(&self) -> Self::DBOptions;
fn set_db_options(&self, options: &[(&str, &str)]) -> Result<()>;
}
pub trait DBOptions {
type TitanDBOptions: TitanDBOptions;
fn new() -> Self;
fn get_max_background_jobs(&self) -> i32;
fn get_rate_bytes_per_sec(&self) -> Option<i64>;
fn set_rate_bytes_per_sec(&mut self, rate_bytes_per_sec: i64) -> Result<()>;
fn get_rate_limiter_auto_tuned(&self) -> Option<bool>;
fn set_rate_limiter_auto_tuned(&mut self, rate_limiter_auto_tuned: bool) -> Result<()>;
fn set_titandb_options(&mut self, opts: &Self::TitanDBOptions);
}
pub trait TitanDBOptions {
fn new() -> Self;
fn set_min_blob_size(&mut self, size: u64);
}