Struct libqaul::storage::configuration::Configuration
source · [−]pub struct Configuration {
pub node: Node,
pub lan: Lan,
pub internet: Internet,
pub user_accounts: Vec<UserAccount>,
pub debug: DebugOption,
pub routing: RoutingOptions,
}
Expand description
Configuration Structure of libqaul
This structure contains the entire configuration of libqaul.
Fields
node: Node
lan: Lan
internet: Internet
user_accounts: Vec<UserAccount>
debug: DebugOption
routing: RoutingOptions
Implementations
sourceimpl Configuration
impl Configuration
Configuration implementation of libqaul
sourcepub fn get<'a>() -> RwLockReadGuard<'a, Configuration>
pub fn get<'a>() -> RwLockReadGuard<'a, Configuration>
lend configuration for reading
sourcepub fn get_user(user_id: String) -> Option<UserAccount>
pub fn get_user(user_id: String) -> Option<UserAccount>
get user account
pub fn update_user_storage(user_id: String, opt: &StorageOptions)
pub fn update_total_size(user_id: String, size: u32)
sourcepub fn get_mut<'a>() -> RwLockWriteGuard<'a, Configuration>
pub fn get_mut<'a>() -> RwLockWriteGuard<'a, Configuration>
lend configuration for writing
sourcepub fn enable_debug_log(enable: bool)
pub fn enable_debug_log(enable: bool)
Enable/disable logging to file for debugging
sourcepub fn get_debug_log() -> bool
pub fn get_debug_log() -> bool
Check if logging to file for debugging is enabled
sourcepub fn is_node_initialized() -> bool
pub fn is_node_initialized() -> bool
Returns true/false whether this node has been initialized, or needs to be created for the first time.
Trait Implementations
sourceimpl Clone for Configuration
impl Clone for Configuration
sourcefn clone(&self) -> Configuration
fn clone(&self) -> Configuration
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Configuration
impl Debug for Configuration
sourceimpl Default for Configuration
impl Default for Configuration
sourceimpl<'de> Deserialize<'de> for Configuration
impl<'de> Deserialize<'de> for Configuration
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for Configuration
impl Serialize for Configuration
Auto Trait Implementations
impl RefUnwindSafe for Configuration
impl Send for Configuration
impl Sync for Configuration
impl Unpin for Configuration
impl UnwindSafe for Configuration
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more