Skip to main content

DaemonClient

Struct DaemonClient 

Source
pub struct DaemonClient { /* private fields */ }
Expand description

D-Bus client wrapper for the daemon.

Implementations§

Source§

impl DaemonClient

Source

pub async fn connect() -> Result<Self>

Attempts to connect to the daemon via D-Bus with auto bus detection.

Tries session bus first, falls back to system bus.

Source

pub async fn connect_with_bus(bus_type: BusType) -> Result<Self>

Attempts to connect to the daemon via D-Bus with specified bus type.

Source

pub async fn set_orientation(&self, orientation: &str) -> Result<()>

Sets the display orientation.

Source

pub async fn get_orientation(&self) -> Result<String>

Gets the current orientation.

Source

pub async fn clear_display(&self, color: &str) -> Result<()>

Clears the display to a solid color.

Source

pub async fn set_face(&self, face: &str) -> Result<()>

Sets the display face.

Source

pub async fn get_face(&self) -> Result<String>

Gets the current face name.

Source

pub async fn set_led(&self, theme: u8, intensity: u8, speed: u8) -> Result<()>

Sets LED parameters.

Source

pub async fn led_off(&self) -> Result<()>

Turns off LEDs.

Source

pub async fn get_led_settings(&self) -> Result<(u8, u8, u8)>

Gets current LED settings.

Source

pub async fn get_theme(&self) -> Result<String>

Gets the current color theme name.

Source

pub async fn set_theme(&self, name: &str) -> Result<()>

Sets the color theme by name.

Source

pub async fn list_themes(&self) -> Result<Vec<String>>

Lists available color themes (IDs only).

Source

pub async fn list_themes_detailed(&self) -> Result<Vec<String>>

Lists available color themes with display names (JSON-encoded).

Source

pub async fn list_face_ids(&self) -> Result<Vec<String>>

Lists available faces (IDs only).

Source

pub async fn list_faces(&self) -> Result<Vec<String>>

Lists available faces with display names (JSON-encoded).

Source

pub async fn list_network_interfaces(&self) -> Result<Vec<String>>

Lists available network interfaces.

Source

pub async fn get_screen_png(&self) -> Result<Vec<u8>>

Gets the screen as PNG data.

Source

pub async fn quit(&self) -> Result<()>

Shuts down the daemon.

Source

pub async fn is_connected(&self) -> Result<bool>

Checks if the LCD is connected.

Source

pub async fn is_web_enabled(&self) -> Result<bool>

Checks if the web UI is enabled.

Source

pub async fn list_complications( &self, ) -> Result<Vec<(String, String, String, bool)>>

Lists complications for the current face. Returns (id, name, description, enabled) tuples.

Source

pub async fn list_complications_detailed(&self) -> Result<Vec<String>>

Lists complications with full details including options. Returns JSON-encoded complication data.

Source

pub async fn get_enabled_complications(&self) -> Result<Vec<String>>

Gets enabled complications for the current face.

Source

pub async fn enable_complication(&self, complication_id: &str) -> Result<()>

Enables a complication for the current face.

Source

pub async fn disable_complication(&self, complication_id: &str) -> Result<()>

Disables a complication for the current face.

Source

pub async fn get_complication_option( &self, complication_id: &str, option_id: &str, ) -> Result<String>

Gets a complication option value.

Source

pub async fn set_complication_option( &self, complication_id: &str, option_id: &str, value: &str, ) -> Result<()>

Sets a complication option value.

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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, 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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more