pub struct WebSocketWatcher<T>{ /* private fields */ }Implementations§
Source§impl<T> WebSocketWatcher<T>
impl<T> WebSocketWatcher<T>
pub fn new(url: String) -> Self
pub fn subscribe( &mut self, subscriber: WebSocketSubscriber<T>, ) -> Result<(), FetchError>
pub fn unsubscribe( &mut self, subscriber: &WebSocketSubscriber<T>, ) -> Result<(), FetchError>
pub fn send<B>(&self, data: &B) -> Result<(), FetchError>
pub fn get_ready_state(&self) -> Option<u16>
Trait Implementations§
Source§impl<T> Debug for WebSocketWatcher<T>
impl<T> Debug for WebSocketWatcher<T>
Source§impl<T> PartialEq for WebSocketWatcher<T>
impl<T> PartialEq for WebSocketWatcher<T>
Source§fn eq(&self, other: &WebSocketWatcher<T>) -> bool
fn eq(&self, other: &WebSocketWatcher<T>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<T> StructuralPartialEq for WebSocketWatcher<T>
Auto Trait Implementations§
impl<T> Freeze for WebSocketWatcher<T>
impl<T> !RefUnwindSafe for WebSocketWatcher<T>
impl<T> !Send for WebSocketWatcher<T>
impl<T> !Sync for WebSocketWatcher<T>
impl<T> Unpin for WebSocketWatcher<T>
impl<T> UnsafeUnpin for WebSocketWatcher<T>
impl<T> !UnwindSafe for WebSocketWatcher<T>
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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.