[−][src]Struct roku_ecp::Device
An HTTP client that communicates with a Roku device.
Implementations
impl Device
[src]
pub async fn launch<'a>(
&self,
app_id: &str,
parameters: Option<&[(&'a str, &'a str)]>
) -> Result<(), Error>
[src]
&self,
app_id: &str,
parameters: Option<&[(&'a str, &'a str)]>
) -> Result<(), Error>
Launches a channel and passes the parameters given. This call will only launch installed channels.
pub async fn install<'a>(
&self,
app_id: &str,
parameters: Option<&[(&'a str, &'a str)]>
) -> Result<(), Error>
[src]
&self,
app_id: &str,
parameters: Option<&[(&'a str, &'a str)]>
) -> Result<(), Error>
Installs and launches a channel along with passing any given parameters.
impl Device
[src]
pub async fn key_press_string(&self, text: &str) -> Result<(), Error>
[src]
Sends a key press event for each character in the string.
pub async fn key_down(&self, key: Key) -> Result<(), Error>
[src]
Equivalent to pressing the remote control key.
pub async fn key_up(&self, key: Key) -> Result<(), Error>
[src]
Equivalent to releasing the remote control key.
pub async fn key_press(&self, key: Key) -> Result<(), Error>
[src]
Equivalent to pressing down and releasing the remote control key.
impl Device
[src]
pub async fn icon(&self, app_id: &str) -> Result<Icon, Error>
[src]
Returns an icon corresponding to the Roku application identified by the app ID.
pub async fn active_app(&self) -> Result<ActiveApp, Error>
[src]
Returns information on the currently opened app.
pub async fn apps(&self) -> Result<Vec<App>, Error>
[src]
Returns information on all currently installed apps.
impl Device
[src]
pub async fn device_info(&self) -> Result<DeviceInfo, Error>
[src]
Retrieves device information similar to that returned by roDeviceInfo for BrightScript.
impl Device
[src]
pub async fn media_player(&self) -> Result<MediaPlayer, Error>
[src]
Information on the current media player state. This includes the current stream segment and position of the content being played, the running time of the content, audio format, and buffering.
impl Device
[src]
pub async fn search(&self, search: SearchRequest<'_>) -> Result<(), Error>
[src]
Sends a URL query string from the search properties given.
impl Device
[src]
pub fn new<T>(ip: T) -> Result<Device, Error> where
T: ToSocketAddrs + Display,
[src]
T: ToSocketAddrs + Display,
Create an HTTP client to communicate with a Roku device. This assumes
the device URL is http://ROKU_IP_HERE:8060
.
pub fn from_url(url: &str) -> Result<Device, Error>
[src]
Creates an HTTP client with a specified URL to communicate with a Roku
device. Use this if the default URL
(http://ROKU_IP_HERE:8060
) is not usable to you.
pub async fn ping(&self) -> Result<(), Error>
[src]
Pings the Roku device to check if the device is online.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Device
[src]
impl Send for Device
[src]
impl Sync for Device
[src]
impl Unpin for Device
[src]
impl !UnwindSafe for Device
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,