pub struct WsClient { /* private fields */ }Implementations§
Source§impl WsClient
impl WsClient
pub fn new( url: String, edge_id: String, version: String, capabilities: Vec<String>, engine: Arc<RoutingEngine>, glyphs: Arc<GlyphRegistry>, ) -> Self
Sourcepub fn outbox(&self) -> Sender<EdgeToServer>
pub fn outbox(&self) -> Sender<EdgeToServer>
Get a sender for outbound EdgeToServer frames. Clone as many times
as needed; adapters publish state updates via this channel.
Sourcepub fn resync_sender(&self) -> Sender<()>
pub fn resync_sender(&self) -> Sender<()>
Clone the ws/edge (re)connect broadcaster. Fires once per
successful connect + Hello exchange. State-pumps subscribe to this
and replay the most recent frame per
(service_type, target, property, output_id) key so weave-server
recovers its full snapshot after a restart — otherwise idle zones
/ lights that haven’t changed since the last connect disappear
from the UI because the adapter’s source-side dedup suppresses
re-sends.
Sourcepub async fn prime_from_cache(&self) -> Result<()>
pub async fn prime_from_cache(&self) -> Result<()>
Populate the routing engine + glyph registry from the local cache, if
one exists. Call this once at startup before entering run().
Auto Trait Implementations§
impl Freeze for WsClient
impl !RefUnwindSafe for WsClient
impl Send for WsClient
impl Sync for WsClient
impl Unpin for WsClient
impl UnsafeUnpin for WsClient
impl !UnwindSafe for WsClient
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