Implementations
sourceimpl<'a, W> ReceiverChannel<'a, W> where
W: Write + Read,
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>>,
sourcepub fn launch_app(&self, app: &CastDeviceApp) -> Result<Application, Error>
pub fn launch_app(&self, app: &CastDeviceApp) -> Result<Application, Error>
sourcepub fn stop_app<S>(&self, session_id: S) -> Result<(), Error> where
S: Into<Cow<'a, str>>,
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.
sourcepub fn get_status(&self) -> Result<Status, Error>
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
.
sourcepub fn set_volume<T>(&self, volume: T) -> Result<Volume, Error> where
T: Into<Volume>,
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
pub fn parse(&self, message: &CastMessage) -> Result<ReceiverResponse, Error>
Auto Trait Implementations
impl<'a, W> !RefUnwindSafe for ReceiverChannel<'a, W>
impl<'a, W> !Send for ReceiverChannel<'a, W>
impl<'a, W> !Sync for ReceiverChannel<'a, W>
impl<'a, W> Unpin for ReceiverChannel<'a, W>
impl<'a, W> !UnwindSafe for ReceiverChannel<'a, W>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more