pub struct NoopDeviceControl;Expand description
No-op implementation used when the host hasn’t registered a device- control backend. Keeps the WS frames from crashing a stripped-down build that doesn’t supervise BLE devices.
Trait Implementations§
Source§impl DeviceControlHook for NoopDeviceControl
impl DeviceControlHook for NoopDeviceControl
Source§fn display_glyph<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
device_type: &'life1 str,
device_id: &'life2 str,
_pattern: &'life3 str,
_brightness: Option<f32>,
_timeout_ms: Option<u32>,
_transition: Option<&'life4 str>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn display_glyph<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
device_type: &'life1 str,
device_id: &'life2 str,
_pattern: &'life3 str,
_brightness: Option<f32>,
_timeout_ms: Option<u32>,
_transition: Option<&'life4 str>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Render
pattern on the device’s display.
pattern is a 9-line ASCII grid (* = on).
brightness is on the closed interval 0.0..=1.0; None =
implementation default.
timeout_ms is the auto-clear timeout; None = implementation
default.
transition is "immediate" or "cross_fade"; None =
implementation default.Source§fn connect_device<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
device_type: &'life1 str,
device_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn connect_device<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
device_type: &'life1 str,
device_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Re-attempt a connection to the device. Implementations should clear
any “paused” flag that suppresses auto-reconnect.
Source§fn disconnect_device<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
device_type: &'life1 str,
device_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn disconnect_device<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
device_type: &'life1 str,
device_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Drop the active connection and set “paused” so the auto-reconnect
loop does not immediately re-establish the link.
Auto Trait Implementations§
impl Freeze for NoopDeviceControl
impl RefUnwindSafe for NoopDeviceControl
impl Send for NoopDeviceControl
impl Sync for NoopDeviceControl
impl Unpin for NoopDeviceControl
impl UnsafeUnpin for NoopDeviceControl
impl UnwindSafe for NoopDeviceControl
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more