pub struct Config {
    pub latest_version: String,
    pub path: String,
    pub config_file_path: String,
    /* private fields */
}
Expand description

describe configuration folder

Fields

latest_version: Stringpath: String

Configuration folder path.

config_file_path: String

config file.

Implementations

Convert user config yaml to struct.

Errors

Will return Err has an error when loading the config file

Return default app config.

Errors

Will return Err could not parse default config to yaml file

update config file with the updated baseline checks.

Errors

Will return Err adding check group return an error

Manage configuration folder & file.

  • Create config folder if not exists.
  • Create default config yaml file if not exists.
Errors

Will return Err file could not created or loaded

Update user settings files.

Arguments
  • remove_checks - if true the given check_group parameter will remove from configuration / if false will add.
  • check_groups - list of check groups to act.
Errors

Will return Err group didn’t added/removed

Reset user configuration to the default app.

Errors

Will return Err create config folder return an error

Update default user challenge.

Arguments
  • challenge - new challenge to update
Errors

Will return Err error return on load/save config

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.

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 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.