pub struct Receiver { /* private fields */ }Implementations§
Source§impl Receiver
impl Receiver
pub fn new() -> Self
pub async fn connect(&self, addr: &str) -> Result<(), Error>
Sourcepub async fn disconnect(&self)
pub async fn disconnect(&self)
Only closes the underlying connection, does not stop any running applications.
pub async fn is_connected(&self) -> bool
pub async fn launch_app(&self, app_id: AppId) -> Result<App, Error>
pub async fn stop_app(&self, app: &App) -> Result<(), Error>
pub async fn volume(&self) -> Result<Volume, Error>
pub async fn set_volume(&self, level: f64, muted: bool) -> Result<(), Error>
pub async fn status(&self) -> Result<Status, Error>
pub async fn send<P: Into<Payload>>( &self, app: &App, payload: P, ) -> Result<(), Error>
pub async fn send_request<P: Into<Payload>>( &self, app: &App, payload: P, ) -> Result<Response, Error>
pub async fn receive(&self) -> Result<Response, Error>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Receiver
impl !UnwindSafe for Receiver
impl Freeze for Receiver
impl Send for Receiver
impl Sync for Receiver
impl Unpin for Receiver
impl UnsafeUnpin for Receiver
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