[][src]Struct yew::services::WebSocketService

pub struct WebSocketService {}

A websocket service attached to a user context.

Implementations

impl WebSocketService[src]

pub fn connect<OUT: 'static>(
    url: &str,
    callback: Callback<OUT>,
    notification: Callback<WebSocketStatus>
) -> Result<WebSocketTask, &str> where
    OUT: From<Text> + From<Binary>, 
[src]

Connects to a server by a websocket connection. Needs two functions to generate data and notification messages.

pub fn connect_binary<OUT: 'static>(
    url: &str,
    callback: Callback<OUT>,
    notification: Callback<WebSocketStatus>
) -> Result<WebSocketTask, &str> where
    OUT: From<Binary>, 
[src]

Connects to a server by a websocket connection, like connect, but only processes binary frames. Text frames are silently ignored. Needs two functions to generate data and notification messages.

pub fn connect_text<OUT: 'static>(
    url: &str,
    callback: Callback<OUT>,
    notification: Callback<WebSocketStatus>
) -> Result<WebSocketTask, &str> where
    OUT: From<Text>, 
[src]

Connects to a server by a websocket connection, like connect, but only processes text frames. Binary frames are silently ignored. Needs two functions to generate data and notification messages.

Trait Implementations

impl Debug for WebSocketService[src]

impl Default for WebSocketService[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> Any for T where
    T: Any
[src]

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

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

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

impl<T, U> Into<U> for T where
    U: From<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.