Struct twitch_api2::helix::Response [−][src]
pub struct Response<R, D> where
R: Request<Response = D>,
D: DeserializeOwned + PartialEq, { pub data: D, pub pagination: Option<Cursor>, pub request: Option<R>, }
This is supported on crate feature
helix
only.Response retrieved from endpoint. Data is the type in Request::Response
Fields
data: D
Twitch’s response field for data
.
pagination: Option<Cursor>
A cursor value, to be used in a subsequent request to specify the starting point of the next set of results.
request: Option<R>
The request that was sent, used for pagination.
Implementations
impl<R, D, T> Response<R, D> where
R: Request<Response = D>,
D: IntoIterator<Item = T> + PartialEq + DeserializeOwned,
[src]
impl<R, D, T> Response<R, D> where
R: Request<Response = D>,
D: IntoIterator<Item = T> + PartialEq + DeserializeOwned,
[src]impl<R, D> Response<R, D> where
R: Request<Response = D> + Clone + Paginated + RequestGet + Debug,
D: DeserializeOwned + Debug + PartialEq,
[src]
impl<R, D> Response<R, D> where
R: Request<Response = D> + Clone + Paginated + RequestGet + Debug,
D: DeserializeOwned + Debug + PartialEq,
[src]pub async fn get_next<'a, C: HttpClient<'a>>(
self,
client: &'a HelixClient<'a, C>,
token: &impl TwitchToken + ?Sized
) -> Result<Option<Response<R, D>>, ClientRequestError<<C as HttpClient<'a>>::Error>>
[src]
pub async fn get_next<'a, C: HttpClient<'a>>(
self,
client: &'a HelixClient<'a, C>,
token: &impl TwitchToken + ?Sized
) -> Result<Option<Response<R, D>>, ClientRequestError<<C as HttpClient<'a>>::Error>>
[src]Get the next page in the responses.
Trait Implementations
impl<R: Debug, D: Debug> Debug for Response<R, D> where
R: Request<Response = D>,
D: DeserializeOwned + PartialEq,
[src]
impl<R: Debug, D: Debug> Debug for Response<R, D> where
R: Request<Response = D>,
D: DeserializeOwned + PartialEq,
[src]impl<R: PartialEq, D: PartialEq> PartialEq<Response<R, D>> for Response<R, D> where
R: Request<Response = D>,
D: DeserializeOwned + PartialEq,
[src]
impl<R: PartialEq, D: PartialEq> PartialEq<Response<R, D>> for Response<R, D> where
R: Request<Response = D>,
D: DeserializeOwned + PartialEq,
[src]impl<R, D> StructuralPartialEq for Response<R, D> where
R: Request<Response = D>,
D: DeserializeOwned + PartialEq,
[src]
R: Request<Response = D>,
D: DeserializeOwned + PartialEq,
Auto Trait Implementations
impl<R, D> RefUnwindSafe for Response<R, D> where
D: RefUnwindSafe,
R: RefUnwindSafe,
D: RefUnwindSafe,
R: RefUnwindSafe,
impl<R, D> Send for Response<R, D> where
D: Send,
R: Send,
D: Send,
R: Send,
impl<R, D> Sync for Response<R, D> where
D: Sync,
R: Sync,
D: Sync,
R: Sync,
impl<R, D> Unpin for Response<R, D> where
D: Unpin,
R: Unpin,
D: Unpin,
R: Unpin,
impl<R, D> UnwindSafe for Response<R, D> where
D: UnwindSafe,
R: UnwindSafe,
D: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
impl<T> WithSubscriber for T
[src]fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
fn with_current_subscriber(self) -> WithDispatch<Self>
[src]
fn with_current_subscriber(self) -> WithDispatch<Self>
[src]Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more