Struct yew_hooks::prelude::UseWebSocketHandle
source · 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 !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> 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.