DisplayMode

Trait DisplayMode 

Source
pub trait DisplayMode:
    Debug
    + Send
    + Sync {
    // Required methods
    fn apply(&self, controller: &AsusController) -> Result<(), ControllerError>;
    fn symbol(&self) -> &'static [u8] ;
    fn mode_id(&self) -> i32;

    // Provided method
    fn is_ereading(&self) -> bool { ... }
}
Expand description

Trait for display mode implementations.

Each display mode knows how to apply itself to the ASUS controller.

Required Methods§

Source

fn apply(&self, controller: &AsusController) -> Result<(), ControllerError>

Apply this mode using the controller.

Source

fn symbol(&self) -> &'static [u8]

Get the RPC symbol name for setting this mode.

Source

fn mode_id(&self) -> i32

Get the mode ID for this mode (used for state tracking).

Provided Methods§

Source

fn is_ereading(&self) -> bool

Whether this is an e-reading/monochrome mode.

Implementors§