feat: implement fullstate on-connect event
This commit is contained in:
parent
05e12ea2f2
commit
73813605d6
4 changed files with 66 additions and 14 deletions
10
lib/main.rs
10
lib/main.rs
|
@ -1,3 +1,5 @@
|
|||
use std::collections::HashMap;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
|
@ -19,4 +21,12 @@ pub enum TagEvent {
|
|||
TagUrgent(u8),
|
||||
TagEnabled(u8),
|
||||
TagDisabled(u8),
|
||||
TagFullState(HashMap<u8, TagState>),
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct TagState {
|
||||
pub enabled: bool,
|
||||
pub occupied: bool,
|
||||
pub urgent: bool,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue