Struct vtubestudio::client::Client
source · pub struct Client<S = BoxCloneApiService> { /* private fields */ }
Expand description
A client for interacting with the VTube Studio API.
This is a wrapper on top of tower::Service
that provides a convenient interface for
send
ing API requests and receiving structured data.
Implementations§
source§impl Client<BoxCloneApiService>
impl Client<BoxCloneApiService>
sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Creates a builder to configure a new client.
§Example
let (mut client, mut events) = Client::builder()
.auth_token(Some("...".to_string()))
.authentication("Plugin name", "Developer name", None)
.build_tungstenite();
source§impl<S> Client<S>
impl<S> Client<S>
sourcepub fn new_from_service(service: S) -> Self
pub fn new_from_service(service: S) -> Self
sourcepub fn into_service(self) -> S
pub fn into_service(self) -> S
Consumes this client and returns the underlying Service
.
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for Client<S>where
S: Freeze,
impl<S> RefUnwindSafe for Client<S>where
S: RefUnwindSafe,
impl<S> Send for Client<S>where
S: Send,
impl<S> Sync for Client<S>where
S: Sync,
impl<S> Unpin for Client<S>where
S: Unpin,
impl<S> UnwindSafe for Client<S>where
S: UnwindSafe,
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