pub struct OmniPaxosConfig {
pub cluster_config: ClusterConfig,
pub server_config: ServerConfig,
}
Expand description
Configuration for OmniPaxos
.
§Fields
cluster_config
: The configuration settings that are cluster-wide.server_config
: The configuration settings that are specific to this OmniPaxos server.
Fields§
§cluster_config: ClusterConfig
§server_config: ServerConfig
Implementations§
Source§impl OmniPaxosConfig
impl OmniPaxosConfig
Sourcepub fn validate(&self) -> Result<(), ConfigError>
pub fn validate(&self) -> Result<(), ConfigError>
Checks that all the fields of the cluster config are valid.
Sourcepub fn with_toml(file_path: &str) -> Result<Self, ConfigError>
Available on crate feature toml_config
only.
pub fn with_toml(file_path: &str) -> Result<Self, ConfigError>
toml_config
only.Creates a new OmniPaxosConfig
from a toml
file.
Trait Implementations§
Source§impl Clone for OmniPaxosConfig
impl Clone for OmniPaxosConfig
Source§fn clone(&self) -> OmniPaxosConfig
fn clone(&self) -> OmniPaxosConfig
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for OmniPaxosConfig
impl Debug for OmniPaxosConfig
Source§impl Default for OmniPaxosConfig
impl Default for OmniPaxosConfig
Source§fn default() -> OmniPaxosConfig
fn default() -> OmniPaxosConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for OmniPaxosConfigwhere
OmniPaxosConfig: Default,
impl<'de> Deserialize<'de> for OmniPaxosConfigwhere
OmniPaxosConfig: Default,
Source§fn 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
Auto Trait Implementations§
impl Freeze for OmniPaxosConfig
impl RefUnwindSafe for OmniPaxosConfig
impl Send for OmniPaxosConfig
impl Sync for OmniPaxosConfig
impl Unpin for OmniPaxosConfig
impl UnwindSafe for OmniPaxosConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more