pub struct OrdrWebsocket { /* private fields */ }
Expand description
Connection to the o!rdr websocket.
Await events with OrdrWebsocket::next_event
.
To gracefully shut the connection down, use OrdrWebsocket::disconnect
.
Implementations§
Source§impl OrdrWebsocket
impl OrdrWebsocket
Sourcepub async fn connect() -> Result<Self, WebsocketError>
pub async fn connect() -> Result<Self, WebsocketError>
Connect to the o!rdr websocket.
Sourcepub async fn next_event(&mut self) -> Result<RawEvent, WebsocketError>
pub async fn next_event(&mut self) -> Result<RawEvent, WebsocketError>
Await the next o!rdr websocket event.
Sourcepub async fn disconnect(self) -> Result<(), WebsocketError>
pub async fn disconnect(self) -> Result<(), WebsocketError>
Gracefully disconnect from the websocket.
Auto Trait Implementations§
impl !Freeze for OrdrWebsocket
impl !RefUnwindSafe for OrdrWebsocket
impl Send for OrdrWebsocket
impl Sync for OrdrWebsocket
impl Unpin for OrdrWebsocket
impl !UnwindSafe for OrdrWebsocket
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