pub(crate) struct WebSocket {
channel: ChannelOwner,
url: String,
var: Mutex<Variable>,
tx: Mutex<Option<Sender<Evt>>>,
}Fields§
§channel: ChannelOwner§url: String§var: Mutex<Variable>§tx: Mutex<Option<Sender<Evt>>>Implementations§
Trait Implementations§
Source§impl EventEmitter for WebSocket
impl EventEmitter for WebSocket
type Event = Evt
fn tx(&self) -> Option<Sender<Self::Event>>
fn set_tx(&self, tx: Sender<Self::Event>)
fn new_tx(&self) -> (Sender<Self::Event>, Receiver<Self::Event>)
fn subscribe_event(&self) -> Receiver<Self::Event>
fn emit_event<E: Into<Self::Event>>(&self, e: E)
Source§impl RemoteObject for WebSocket
impl RemoteObject for WebSocket
fn channel(&self) -> &ChannelOwner
fn channel_mut(&mut self) -> &mut ChannelOwner
fn handle_event( &self, _ctx: &Context, method: Str<Method>, params: Map<String, Value>, ) -> Result<(), Error>
fn guid(&self) -> &S<Guid>
fn context(&self) -> Result<Arc<Mutex<Context>>, Error>
Auto Trait Implementations§
impl !Freeze for WebSocket
impl RefUnwindSafe for WebSocket
impl Send for WebSocket
impl Sync for WebSocket
impl Unpin for WebSocket
impl UnwindSafe for WebSocket
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