pub struct Config {
    pub aether: AetherConfig,
    pub handshake: HandshakeConfig,
    pub link: LinkConfig,
}
Expand description

Structure to represent configuration options for aether_lib

Fields

aether: AetherConfig

Configuration for peer module

handshake: HandshakeConfig

Configuration for handshake module

link: LinkConfig

Configuration for link module

Implementations

Returns configuration read from file_path Configuration file must be in YAML format This may return an AetherError if the file is not present or if the file is not correctly formated as yaml

Examples
use aether_lib::config::Config;
use std::path::Path;

// For a file located inside /home/user/aether_config.yaml we can construct
// a path
let path = Path::new("/home/user/aether_config.yaml");

let config = Config::from_file(&path);

Returns configuration read from the default configuration file If default configuration file is not found, the default internal configuration is returned

Examples
use aether_lib::config::Config;
let config = Config::get_config();

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

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.

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.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

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.