[−][src]Struct yew::services::websocket::WebSocketService
A websocket service attached to a user context.
Implementations
impl WebSocketService
[src]
pub fn new() -> Self
[src]
Creates a new service instance connected to App
by provided sender
.
pub fn connect<OUT: 'static>(
&mut self,
url: &str,
callback: Callback<OUT>,
notification: Callback<WebSocketStatus>
) -> Result<WebSocketTask, &str> where
OUT: From<Text> + From<Binary>,
[src]
&mut self,
url: &str,
callback: Callback<OUT>,
notification: Callback<WebSocketStatus>
) -> Result<WebSocketTask, &str> where
OUT: From<Text> + From<Binary>,
Connects to a server by a websocket connection. Needs two functions to generate data and notification messages.
pub fn connect_binary<OUT: 'static>(
&mut self,
url: &str,
callback: Callback<OUT>,
notification: Callback<WebSocketStatus>
) -> Result<WebSocketTask, &str> where
OUT: From<Binary>,
[src]
&mut self,
url: &str,
callback: Callback<OUT>,
notification: Callback<WebSocketStatus>
) -> Result<WebSocketTask, &str> where
OUT: From<Binary>,
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>(
&mut self,
url: &str,
callback: Callback<OUT>,
notification: Callback<WebSocketStatus>
) -> Result<WebSocketTask, &str> where
OUT: From<Text>,
[src]
&mut self,
url: &str,
callback: Callback<OUT>,
notification: Callback<WebSocketStatus>
) -> Result<WebSocketTask, &str> where
OUT: From<Text>,
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]
fn default() -> WebSocketService
[src]
Auto Trait Implementations
impl RefUnwindSafe for WebSocketService
impl Send for WebSocketService
impl Sync for WebSocketService
impl Unpin for WebSocketService
impl UnwindSafe for WebSocketService
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
[src]
T: Any,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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.
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>,