Enum vtubestudio::client::ClientEvent
source · #[non_exhaustive]pub enum ClientEvent {
Connected,
Disconnected,
NewAuthToken(String),
Api(Event),
Error(Error),
}
Expand description
A client event received outside of the typical request/response flow.
This includes Event
s received from the API, as requested via
EventSubscriptionRequest
.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Connected
The underlying event transport established a connection.
Note that by default, Client
connects lazily, so this event might not be received until
after making the first request.
Disconnected
The underlying event transport disconnected.
You can use this as a signal to resubscribe to events.
NewAuthToken(String)
Received new auth token.
Api(Event)
Event received from the API.
Error(Error)
Error received outside the request/response flow.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ClientEvent
impl !RefUnwindSafe for ClientEvent
impl Send for ClientEvent
impl Sync for ClientEvent
impl Unpin for ClientEvent
impl !UnwindSafe for ClientEvent
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