Struct repo_backup::config::Config [−][src]
pub struct Config { pub general: General, pub github: Option<GithubConfig>, pub gitlab: Option<GitLabConfig>, }
The overall configuration struct.
Fields
general: General
General configuration options.
github: Option<GithubConfig>
Settings specific to the Github
provider.
gitlab: Option<GitLabConfig>
Settings for the GitLab
provider.
Methods
impl Config
[src]
impl Config
pub fn from_file<P: AsRef<Path>>(file: P) -> Result<Config, Error>
[src]
pub fn from_file<P: AsRef<Path>>(file: P) -> Result<Config, Error>
Load a Config
from some file on disk.
pub fn from_str(src: &str) -> Result<Config, Error>
[src]
pub fn from_str(src: &str) -> Result<Config, Error>
Load the config directly from a source string.
pub fn example() -> Config
[src]
pub fn example() -> Config
Generate an example config.
pub fn as_toml(&self) -> String
[src]
pub fn as_toml(&self) -> String
Serialize the Config
as TOML.
Trait Implementations
impl Debug for Config
[src]
impl Debug for Config
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Config
[src]
impl Clone for Config
fn clone(&self) -> Config
[src]
fn clone(&self) -> Config
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl PartialEq for Config
[src]
impl PartialEq for Config