pub struct CliHub { /* private fields */ }Expand description
Shared CLI-platform state.
Clone it freely: the dispatcher, CliActionSenders, acpbot-style
platform senders, and transports all hold their own handle.
Implementations§
Source§impl CliHub
impl CliHub
Sourcepub fn next_message_id(&self) -> i64
pub fn next_message_id(&self) -> i64
Assign the next platform message id.
Sourcepub fn subscribe(&self) -> Receiver<String>
pub fn subscribe(&self) -> Receiver<String>
Register a new outbound sink. The returned receiver yields one JSONL line per outbound action until unsubscribed (channel dropped).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CliHub
impl RefUnwindSafe for CliHub
impl Send for CliHub
impl Sync for CliHub
impl Unpin for CliHub
impl UnsafeUnpin for CliHub
impl UnwindSafe for CliHub
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