Struct rust_cast::channels::receiver::ReceiverChannel
[−]
[src]
pub struct ReceiverChannel<'a, W> where
W: Write + Read, { /* fields omitted */ }
Methods
impl<'a, W> ReceiverChannel<'a, W> where
W: Write + Read,
[src]
W: Write + Read,
pub fn new<S>(
sender: S,
receiver: S,
message_manager: Rc<MessageManager<W>>
) -> ReceiverChannel<'a, W> where
S: Into<Cow<'a, str>>,
[src]
sender: S,
receiver: S,
message_manager: Rc<MessageManager<W>>
) -> ReceiverChannel<'a, W> where
S: Into<Cow<'a, str>>,
pub fn launch_app(&self, app: &CastDeviceApp) -> Result<Application, Error>
[src]
Launches the specified receiver's application.
Examples
cast_device.receiver.launch_app(&CastDeviceApp::from_str("youtube").unwrap());
Arguments
app
-CastDeviceApp
instance reference to run.
pub fn stop_app<S>(&self, session_id: S) -> Result<(), Error> where
S: Into<Cow<'a, str>>,
[src]
S: Into<Cow<'a, str>>,
Stops currently active app using corresponding session_id
.
Arguments
session_id
- identifier of the active application session fromApplication
instance.
pub fn get_status(&self) -> Result<Status, Error>
[src]
Retrieves status of the cast device receiver.
Return value
Returned Result
should consist of either Status
instance or an Error
.
pub fn set_volume<T>(&self, volume: T) -> Result<Volume, Error> where
T: Into<Volume>,
[src]
T: Into<Volume>,
Sets volume for the active cast device.
Arguments
volume
- anything that can be converted to a validVolume
structure. It's possible to set volume level, mute/unmute state or both altogether.
Return value
Actual Volume
instance returned by receiver.
Errors
Usually method can fail only if network connection with cast device is lost for some reason.