Skip to main content

IpcController

Trait IpcController 

Source
pub trait IpcController {
    // Required methods
    fn get_type(&self, key: &str) -> String;
    fn change_val(&self, key: &str, val: &str);

    // Provided method
    fn custom_command(&self, _command: &str) { ... }
}
Expand description

This trait is implemented upon slint generated windows to enable IPC handling

Required Methods§

Source

fn get_type(&self, key: &str) -> String

On calling spell-cli -l layer_name look var_name, the cli calls get_type method of the trait with var_name as input.

Source

fn change_val(&self, key: &str, val: &str)

It is called on spell-cli -l layer_name update key value. as_any is for syncing the changes internally for now and need not be implemented by the end user.

Provided Methods§

Source

fn custom_command(&self, _command: &str)

This method is invoked is neither update nor look is called. Can be used to perform custom operations.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§