pub struct Config {
    pub plugin_settings: RwLock<HashMap<String, Value>>,
    pub loaded_configs: RwLock<HashMap<String, UniqueDeviceConfig>>,
    pub loaded_images: RwLock<HashMap<String, ImageCollection>>,
    /* private fields */
}
Expand description

Struct to keep daemon settings

Fields

plugin_settings: RwLock<HashMap<String, Value>>loaded_configs: RwLock<HashMap<String, UniqueDeviceConfig>>

Currently loaded device configs

loaded_images: RwLock<HashMap<String, ImageCollection>>

Currently loaded image collections

Implementations

Reads config and retrieves config struct

Pool rate, defaults to DEFAULT_FRAME_RATE if not set

Reconnect rate, defaults to DEFAULT_RECONNECT_TIME if not set

Device config path, defaults to DEFAULT_CONFIG_PATH if not set

Plugin folder path, defaults to DEFAULT_PLUGIN_PATH if not set

Global config path, defaults to DEFAULT_PLUGIN_SETTINGS_PATH if not set

Loads plugin settings from file

Retrieves plugin settings if it exists

Sets plugin settings

Writes plugin settings to file

Reloads device config for specified serial

Reloads all device configs

Saves device config for specified serial

Saves device configs for all serials

Retrieves device config for specified serial

Sets device config for specified serial

Gets an array of all device configs

Disables a device config, so it will not be loaded by default

Restores device config if it exists

Adds base64 image to device config image collection

Encodes image to base64 and adds it to device config image collection

Gets images from device config

Removes image from device config

Syncs images with core

Retrieves image collection for device if device exists

Trait Implementations

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

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Convert the source color to the destination color using the specified method Read more

Convert the source color to the destination color using the bradford method by default Read more

Gets the TypeId of self. Read more

The error type produced by a failed conversion.

Convert the given value into an approximately equivalent representation.

The error type produced by a failed conversion.

Convert the subject into an approximately equivalent representation.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Approximate the subject with the default scheme.

Approximate the subject with a specific scheme.

Approximate the subject to a given type with the default scheme.

Approximate the subject to a given type with a specific scheme.

Convert the subject to a given type.

Attempt to convert the subject to a given type.

Attempt a value conversion of the subject to a given type.

Returns the argument unchanged.

Calls U::from(self).

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

Convert into T with values clamped to the color defined bounds Read more

Convert into T. The resulting color might be invalid in its color space Read more

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

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().

The error type produced by a failed conversion.

Convert the given value into the subject type.

The type returned in the event of a conversion error.

Performs the conversion.

The error type produced by a failed conversion.

Convert the subject into the destination type.

The type returned in the event of a conversion error.

Performs the conversion.

Convert into T, returning ok if the color is inside of its defined range, otherwise an OutOfBounds error is returned which contains the unclamped color. Read more

The error type produced by a failed conversion.

Convert the given value into an exactly equivalent representation.

The error type produced by a failed conversion.

Convert the subject into an exactly equivalent representation.