pub struct WebsocketClient {
pub connection: Option<Connection>,
}Fields§
§connection: Option<Connection>Implementations§
Source§impl WebsocketClient
impl WebsocketClient
pub fn new() -> Self
pub async fn connect( connect_addr: String, ) -> Result<Connection, WebsocketClientError>
pub async fn listen_future( &mut self, conn: Connection, channel: Sender<InboundMessage>, ) -> impl Future<Output = ()> + '_
pub async fn listen( &mut self, conn: Connection, channel: Sender<InboundMessage>, )
pub fn add_connection(&mut self, connection: Connection)
pub async fn get_outbound_messages_tx( &self, ) -> Result<Sender<SocketMessage>, WebsocketClientError>
Auto Trait Implementations§
impl Freeze for WebsocketClient
impl !RefUnwindSafe for WebsocketClient
impl Send for WebsocketClient
impl Sync for WebsocketClient
impl Unpin for WebsocketClient
impl !UnwindSafe for WebsocketClient
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