Skip to main content

DaemonMessage

Enum DaemonMessage 

Source
pub enum DaemonMessage {
Show 16 variants Hello { api: u32, version: String, }, Modules { modules: Vec<String>, }, Contributions { contributions: Vec<Contribution>, }, State { module: String, state: Value, }, Live { module: String, value: Value, }, Present { activity: Option<Activity>, resting: Option<Activity>, output: Option<String>, }, Bubbles { bubbles: Vec<Bubble>, overflow: Vec<Overflow>, stack: Option<Stacking>, arrangements: Vec<AreaArrangement>, tooltip_ms: Option<u64>, }, Theme { theme: Box<Theme>, }, Ok, Output { output: String, }, Status { status: Status, }, Actions { modules: Vec<ModuleActions>, }, Error { code: ErrorCode, message: String, }, Profiling { on: bool, }, Covered { outputs: Vec<String>, desktops: Vec<String>, }, ReloadViews,
}
Expand description

Sent by the daemon.

Variants§

§

Hello

Answer to the client’s hello.

Fields

§api: u32
§version: String
§

Modules

The enabled modules. Sent to the UI after hello and when the list changes.

Fields

§modules: Vec<String>
§

Contributions

What modules offer each other, from every enabled module. Sent to the UI after hello.

Fields

§contributions: Vec<Contribution>
§

State

The latest state a module published. Sent to the UI after hello for every module, then whenever it changes.

Fields

§module: String
§state: Value
§

Live

A passing value a module sends many times a second, like an audio meter’s level. The daemon doesn’t keep it or send it again.

Fields

§module: String
§value: Value
§

Present

What the island shows now. None when no activity exists at all.

Fields

§activity: Option<Activity>
§resting: Option<Activity>

What islands on other monitors show while activity is meant for one monitor: the idle island, when it runs. Only without output.

§output: Option<String>

The monitor whose island shows activity; every monitor’s without it. Each monitor has an island of its own.

§

Bubbles

Every bubble, in drawing order. Sent to the UI after hello and on every change.

Fields

§bubbles: Vec<Bubble>
§overflow: Vec<Overflow>
§stack: Option<Stacking>

How stacked areas behave, when any area stacks.

§arrangements: Vec<AreaArrangement>

The areas that merge or stack their bubbles; the others lay them apart.

§tooltip_ms: Option<u64>

How long the pointer rests on a bubble before its tooltip shows; none means never.

§

Theme

Design tokens. Sent to the UI after hello and on reload.

Fields

§theme: Box<Theme>
§

Ok

A request succeeded.

§

Output

A command succeeded with something to say: a choice the user made, for example. mochi ipc prints it.

Fields

§output: String
§

Status

Answer to status.

Fields

§status: Status
§

Actions

Answer to list_actions.

Fields

§

Error

A request failed, or a message could not be handled.

Fields

§message: String
§

Profiling

Whether the daemon profiles now: while it does, the UI counts the frames each window draws and sends frames every second. Sent to the UI after hello and whenever it changes. UI only.

Fields

§on: bool
§

Covered

The outputs a fullscreen window covers, by name: their island and desktop can’t be seen, so views there stop moving. Sent to the UI after hello and whenever it changes. UI only.

Fields

§outputs: Vec<String>
§desktops: Vec<String>

The monitors whose desktop windows hide, which covers the desktop widgets there but not the island.

§

ReloadViews

Reload the views in place, keeping the windows: the shell directory has a module it didn’t have. The UI says hello again once it has. UI only.

Trait Implementations§

Source§

impl Clone for DaemonMessage

Source§

fn clone(&self) -> DaemonMessage

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DaemonMessage

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for DaemonMessage

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for DaemonMessage

Source§

fn eq(&self, other: &DaemonMessage) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for DaemonMessage

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for DaemonMessage

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.