Struct lg_webos_client::client::WebosClient [−][src]
pub struct WebosClient { /* fields omitted */ }
Expand description
Client for interacting with TV
Implementations
Creates client connected to device with given address
pub async fn from_stream_and_sink<T, S>(
stream: T,
sink: S,
config: WebOsClientConfig
) -> Result<WebosClient, String> where
T: Stream<Item = Result<Message, Error>> + 'static + Send,
S: Sink<Message, Error = Error> + Unpin + 'static,
pub async fn from_stream_and_sink<T, S>(
stream: T,
sink: S,
config: WebOsClientConfig
) -> Result<WebosClient, String> where
T: Stream<Item = Result<Message, Error>> + 'static + Send,
S: Sink<Message, Error = Error> + Unpin + 'static,
Creates client using provided stream and sink
Sends single command and waits for response
pub async fn send_all_commands(
&mut self,
cmds: Vec<Command>
) -> Result<Vec<CommandResponse>, String>
pub async fn send_all_commands(
&mut self,
cmds: Vec<Command>
) -> Result<Vec<CommandResponse>, String>
Sends mutliple commands and waits for responses