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§
Sourcefn get_type(&self, key: &str) -> String
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.
Sourcefn change_val(&self, key: &str, val: &str)
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§
Sourcefn custom_command(&self, _command: &str)
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".