pub trait AuthToken: Sized + Sealed {
// Required methods
async fn raw_query_post<'a, Q: PostQuery + Query<Self>>(
&self,
client: &Client,
query: &'a Q,
) -> Result<RawResult<'a, Q, Self>>;
async fn raw_query_get<'a, Q: GetQuery + Query<Self>>(
&self,
client: &Client,
query: &'a Q,
) -> Result<RawResult<'a, Q, Self>>;
fn deserialize_json<Q: Query<Self>>(
raw: RawResult<'_, Q, Self>,
) -> Result<ProcessedResult<'_, Q>>;
}Expand description
An authentication token into Youtube Music that can be used to query the API. Currently sealed due to use of async, although this could become open for implementation in future.
Required Methods§
Sourceasync fn raw_query_post<'a, Q: PostQuery + Query<Self>>(
&self,
client: &Client,
query: &'a Q,
) -> Result<RawResult<'a, Q, Self>>
async fn raw_query_post<'a, Q: PostQuery + Query<Self>>( &self, client: &Client, query: &'a Q, ) -> Result<RawResult<'a, Q, Self>>
Run a post query that returns a raw json response.
Sourceasync fn raw_query_get<'a, Q: GetQuery + Query<Self>>(
&self,
client: &Client,
query: &'a Q,
) -> Result<RawResult<'a, Q, Self>>
async fn raw_query_get<'a, Q: GetQuery + Query<Self>>( &self, client: &Client, query: &'a Q, ) -> Result<RawResult<'a, Q, Self>>
Run a get query that returns a raw json response.
Sourcefn deserialize_json<Q: Query<Self>>(
raw: RawResult<'_, Q, Self>,
) -> Result<ProcessedResult<'_, Q>>
fn deserialize_json<Q: Query<Self>>( raw: RawResult<'_, Q, Self>, ) -> Result<ProcessedResult<'_, Q>>
Process the result, by deserializing into JSON and checking for errors.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.