Struct confitul::Cluster

source ·
pub struct Cluster {
    pub local_host: LocalHost,
    /* private fields */
}

Fields§

§local_host: LocalHost

Implementations§

Examples found in repository?
src/cluster.rs (line 26)
18
19
20
21
22
23
24
25
26
27
28
    pub fn new(options: Option<ClusterOptions>) -> Result<Cluster, ParseError> {
        let real_options = options.unwrap_or(ClusterOptions::default());
        let local_host = LocalHost::new(Some(real_options.local_host))?;
        let mut cluster = Cluster {
            local_host,
            remote_hosts: HashMap::new(),
            nodes: HashMap::new(),
        };
        cluster.resize(real_options.size);
        Ok(cluster)
    }

Trait Implementations§

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.