Struct rust_cast::channels::receiver::ReceiverChannel [] [src]

pub struct ReceiverChannel<'a, W> where W: Write {
    // some fields omitted
}

Methods

impl<'a, W> ReceiverChannel<'a, W> where W: Write
[src]

fn new<S>(sender: S, receiver: S, writer: Rc<RefCell<W>>) -> ReceiverChannel<'a, W> where S: Into<Cow<'a, str>>

fn launch_app(&self, app: CastDeviceApp) -> Result<()Error>

fn stop_app<S>(&self, session_id: S) -> Result<()Error> where S: Into<Cow<'a, str>>

fn get_status(&self) -> Result<()Error>

fn set_volume<T>(&self, volume: T) -> Result<()Error> where T: Into<Volume>

Sets volume for the active cast device.

Arguments

  • volume - anything that can be converted to a valid Volume structure. It's possible to set volume level, mute/unmute state or both altogether.

Errors

Usually method can fail only if network connection with cast device is lost for some reason.

fn can_handle(&self, message: &CastMessage) -> bool

fn parse(&self, message: &CastMessage) -> Result<ReceiverResponseError>