[][src]Struct medea_jason::rpc::RpcClient

pub struct RpcClient(_);

Methods

impl RpcClient[src]

pub fn new(token: String, ping_interval: i32) -> Self[src]

pub fn init(&mut self) -> impl Future<Item = (), Error = WasmErr>[src]

Creates new WebSocket connection to remote media server. Starts Heartbeat if connection succeeds and binds handlers on receiving messages from server and closing socket.

pub fn subscribe(&self) -> impl Stream<Item = Event, Error = ()>[src]

Returns Stream of all Events received by this RpcClient.

pub fn unsub(&self)[src]

Unsubscribe from this RpcClient. Drops all subscriptions atm.

pub fn send_command(&self, command: Command)[src]

Sends Command to Medea.

Trait Implementations

impl Drop for RpcClient[src]

fn drop(&mut self)[src]

Drops related connection and its [Heartbeat].

Auto Trait Implementations

impl Unpin for RpcClient

impl !Sync for RpcClient

impl !Send for RpcClient

impl !UnwindSafe for RpcClient

impl !RefUnwindSafe for RpcClient

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]