pub struct SDCore {
    pub module_manager: Arc<ModuleManager>,
    pub current_stack: Mutex<Vec<ButtonPanel>>,
    pub image_size: (usize, usize),
    pub image_collection: ImageCollection,
    pub key_count: u8,
    pub pool_rate: u32,
    pub should_close: RwLock<bool>,
    /* private fields */
}
Expand description

Core struct that contains all relevant information about streamdeck and manages the streamdeck

Fields

module_manager: Arc<ModuleManager>

Module manager

current_stack: Mutex<Vec<ButtonPanel>>

Current panel stack

image_size: (usize, usize)

Image size supported by streamdeck

image_collection: ImageCollection

Image collection to use for rendering

key_count: u8

Key count of the streamdeck device

pool_rate: u32

Pool rate of how often should the core read events from the device

should_close: RwLock<bool>

Decides if core is dead

Implementations

Creates an instance of core that is already dead

Creates an instance of the core over existing streamdeck connection

Tells renderer’s thread it’s time to redraw

Gets current images rendered on streamdeck

Sends commands to streamdeck thread

Checks if core is supposed to be closed

Kills the core and all the related threads

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

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.