pub struct UseWebSocketHandle {
pub ready_state: UseStateHandle<UseWebSocketReadyState>,
pub message: UseStatePtrEqHandle<Option<String>>,
pub message_bytes: UseStatePtrEqHandle<Option<Vec<u8>>>,
pub ws: Rc<RefCell<Option<WebSocket>>>,
/* private fields */
}
Expand description
State handle for the use_websocket
hook.
Fields§
§ready_state: UseStateHandle<UseWebSocketReadyState>
The current state of the WebSocket
connection.
message: UseStatePtrEqHandle<Option<String>>
Latest text message received from WebSocket
.
message_bytes: UseStatePtrEqHandle<Option<Vec<u8>>>
Latest binary message received from WebSocket
.
ws: Rc<RefCell<Option<WebSocket>>>
The WebSocket
instance.
Implementations§
Source§impl UseWebSocketHandle
impl UseWebSocketHandle
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UseWebSocketHandle
impl !RefUnwindSafe for UseWebSocketHandle
impl !Send for UseWebSocketHandle
impl !Sync for UseWebSocketHandle
impl Unpin for UseWebSocketHandle
impl !UnwindSafe for UseWebSocketHandle
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.