pub struct EsReceiver { /* private fields */ }Implementations§
Source§impl EsReceiver
impl EsReceiver
Sourcepub fn new() -> (Self, EventHandler)
pub fn new() -> (Self, EventHandler)
Returns a receiver and an event-handler that can be passed to crate::ws_connect.
Sourcepub fn new_with_callback(
wake_up: impl Fn() + Send + Sync + 'static,
) -> (Self, EventHandler)
pub fn new_with_callback( wake_up: impl Fn() + Send + Sync + 'static, ) -> (Self, EventHandler)
The given callback will be called on each new message.
This can be used to wake up the UI thread.
pub fn try_recv(&self) -> Option<EsEvent>
Auto Trait Implementations§
impl Freeze for EsReceiver
impl RefUnwindSafe for EsReceiver
impl Send for EsReceiver
impl !Sync for EsReceiver
impl Unpin for EsReceiver
impl UnwindSafe for EsReceiver
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