Struct vtubestudio::data::RequestEnvelope
source · pub struct RequestEnvelope {
pub api_name: Cow<'static, str>,
pub api_version: Cow<'static, str>,
pub request_id: Option<RequestId>,
pub message_type: EnumString<RequestType>,
pub data: OpaqueValue,
}
Expand description
A VTube Studio API request.
Fields§
§api_name: Cow<'static, str>
API name, typically "VTubeStudioPublicAPI"
.
api_version: Cow<'static, str>
API version, typically "1.0"
.
request_id: Option<RequestId>
The original request ID.
message_type: EnumString<RequestType>
The request type.
data: OpaqueValue
The request data.
Implementations§
Trait Implementations§
source§impl Clone for RequestEnvelope
impl Clone for RequestEnvelope
source§fn clone(&self) -> RequestEnvelope
fn clone(&self) -> RequestEnvelope
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RequestEnvelope
impl Debug for RequestEnvelope
source§impl Default for RequestEnvelope
impl Default for RequestEnvelope
source§impl<'de> Deserialize<'de> for RequestEnvelope
impl<'de> Deserialize<'de> for RequestEnvelope
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Policy<RequestEnvelope, ResponseEnvelope, Error> for RetryPolicy
impl Policy<RequestEnvelope, ResponseEnvelope, Error> for RetryPolicy
§type Future = Ready<RetryPolicy>
type Future = Ready<RetryPolicy>
The
Future
type returned by Policy::retry
.source§fn retry(
&self,
req: &RequestEnvelope,
result: Result<&ResponseEnvelope, &Error>,
) -> Option<Self::Future>
fn retry( &self, req: &RequestEnvelope, result: Result<&ResponseEnvelope, &Error>, ) -> Option<Self::Future>
Check the policy if a certain request should be retried. Read more
source§fn clone_request(&self, req: &RequestEnvelope) -> Option<RequestEnvelope>
fn clone_request(&self, req: &RequestEnvelope) -> Option<RequestEnvelope>
Tries to clone a request before being passed to the inner service. Read more
source§impl Serialize for RequestEnvelope
impl Serialize for RequestEnvelope
source§impl<T> Service<RequestEnvelope> for ApiService<T>where
T: Sink<RequestEnvelope> + TryStream<Ok = ResponseEnvelope> + 'static,
BoxError: From<<T as Sink<RequestEnvelope>>::Error> + From<<T as TryStream>::Error>,
impl<T> Service<RequestEnvelope> for ApiService<T>where
T: Sink<RequestEnvelope> + TryStream<Ok = ResponseEnvelope> + 'static,
BoxError: From<<T as Sink<RequestEnvelope>>::Error> + From<<T as TryStream>::Error>,
§type Response = ResponseEnvelope
type Response = ResponseEnvelope
Responses given by the service.
§type Future = Pin<Box<dyn Future<Output = Result<<ApiService<T> as Service<RequestEnvelope>>::Response, <ApiService<T> as Service<RequestEnvelope>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<ApiService<T> as Service<RequestEnvelope>>::Response, <ApiService<T> as Service<RequestEnvelope>>::Error>> + Send>>
The future response value.
source§impl<S> Service<RequestEnvelope> for Authentication<S>
impl<S> Service<RequestEnvelope> for Authentication<S>
§type Response = ResponseWithToken
type Response = ResponseWithToken
Responses given by the service.
§type Future = Pin<Box<dyn Future<Output = Result<<Authentication<S> as Service<RequestEnvelope>>::Response, <Authentication<S> as Service<RequestEnvelope>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<Authentication<S> as Service<RequestEnvelope>>::Response, <Authentication<S> as Service<RequestEnvelope>>::Error>> + Send>>
The future response value.
source§impl<T, C> Sink<RequestEnvelope> for ApiTransport<T, C>
impl<T, C> Sink<RequestEnvelope> for ApiTransport<T, C>
§type Error = Box<dyn Error + Sync + Send>
type Error = Box<dyn Error + Sync + Send>
The type of value produced by the sink when an error occurs.
source§fn poll_ready(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Result<(), Self::Error>>
fn poll_ready( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>
Attempts to prepare the
Sink
to receive a value. Read moresource§fn start_send(
self: Pin<&mut Self>,
item: RequestEnvelope,
) -> Result<(), Self::Error>
fn start_send( self: Pin<&mut Self>, item: RequestEnvelope, ) -> Result<(), Self::Error>
Begin the process of sending a value to the sink.
Each call to this function must be preceded by a successful call to
poll_ready
which returned Poll::Ready(Ok(()))
. Read moreAuto Trait Implementations§
impl Freeze for RequestEnvelope
impl RefUnwindSafe for RequestEnvelope
impl Send for RequestEnvelope
impl Sync for RequestEnvelope
impl Unpin for RequestEnvelope
impl UnwindSafe for RequestEnvelope
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