pub struct WebSocketService {}
Expand description
A WebSocket service attached to a user context.
Implementations§
Source§impl WebSocketService
impl WebSocketService
Sourcepub fn connect<OUT>(
url: &str,
callback: Callback<OUT>,
notification: Callback<WebSocketStatus>,
) -> Result<WebSocketTask, WebSocketError>
pub fn connect<OUT>( url: &str, callback: Callback<OUT>, notification: Callback<WebSocketStatus>, ) -> Result<WebSocketTask, WebSocketError>
Connects to a server through a WebSocket connection. Needs two callbacks; one is passed data, the other is passed updates about the WebSocket’s status.
Sourcepub fn connect_binary<OUT>(
url: &str,
callback: Callback<OUT>,
notification: Callback<WebSocketStatus>,
) -> Result<WebSocketTask, WebSocketError>
pub fn connect_binary<OUT>( url: &str, callback: Callback<OUT>, notification: Callback<WebSocketStatus>, ) -> Result<WebSocketTask, WebSocketError>
Connects to a server through a WebSocket connection, like connect, but only processes binary frames. Text frames are silently ignored. Needs two functions to generate data and notification messages.
Sourcepub fn connect_text<OUT>(
url: &str,
callback: Callback<OUT>,
notification: Callback<WebSocketStatus>,
) -> Result<WebSocketTask, WebSocketError>
pub fn connect_text<OUT>( url: &str, callback: Callback<OUT>, notification: Callback<WebSocketStatus>, ) -> Result<WebSocketTask, WebSocketError>
Connects to a server through 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§
Source§impl Debug for WebSocketService
impl Debug for WebSocketService
Source§impl Default for WebSocketService
impl Default for WebSocketService
Source§fn default() -> WebSocketService
fn default() -> WebSocketService
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WebSocketService
impl RefUnwindSafe for WebSocketService
impl Send for WebSocketService
impl Sync for WebSocketService
impl Unpin for WebSocketService
impl UnwindSafe for WebSocketService
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T, V> IntoOptPropValue<V> for Twhere
T: IntoPropValue<Option<V>>,
impl<T, V> IntoOptPropValue<V> for Twhere
T: IntoPropValue<Option<V>>,
Source§fn into_opt_prop_value(self) -> Option<V>
fn into_opt_prop_value(self) -> Option<V>
Convert
self
to an optional value of a Properties
struct.Source§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self
to a value of a Properties
struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self
to a value of a Properties
struct.