Struct rust_cast::channels::receiver::ReceiverChannel [−][src]
Methods
impl<'a, W> ReceiverChannel<'a, W> where
W: Write + Read,
[src]
impl<'a, W> ReceiverChannel<'a, W> where
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]
pub fn new<S>(
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]
pub fn launch_app(&self, app: &CastDeviceApp) -> Result<Application, Error>
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]
pub fn stop_app<S>(&self, session_id: S) -> Result<(), Error> where
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]
pub fn get_status(&self) -> Result<Status, Error>
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]
pub fn set_volume<T>(&self, volume: T) -> Result<Volume, Error> where
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.
pub fn can_handle(&self, message: &CastMessage) -> bool
[src]
pub fn can_handle(&self, message: &CastMessage) -> bool
pub fn parse(&self, message: &CastMessage) -> Result<ReceiverResponse, Error>
[src]
pub fn parse(&self, message: &CastMessage) -> Result<ReceiverResponse, Error>
Auto Trait Implementations
impl<'a, W> !Send for ReceiverChannel<'a, W>
impl<'a, W> !Send for ReceiverChannel<'a, W>
impl<'a, W> !Sync for ReceiverChannel<'a, W>
impl<'a, W> !Sync for ReceiverChannel<'a, W>