Struct egg_mode::Response [] [src]

pub struct Response<T> {
    pub rate_limit: i32,
    pub rate_limit_remaining: i32,
    pub rate_limit_reset: i32,
    pub response: T,
}

A helper struct to wrap response data with accompanying rate limit information.

Fields

rate_limit: i32

The rate limit ceiling for the given request.

rate_limit_remaining: i32

The number of requests left for the 15-minute window.

rate_limit_reset: i32

The UTC Unix timestamp at which the rate window resets.

response: T

The decoded response from the request.

Trait Implementations

impl<T: Debug> Debug for Response<T>
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<T> IntoIterator for Response<Vec<T>>
[src]

type Item = Response<T>

The type of the elements being iterated over.

type IntoIter = ResponseIter<T>

Which kind of iterator are we turning this into?

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more

impl<T> FromIterator<Response<T>> for Response<Vec<T>>
[src]

fn from_iter<I>(iter: I) -> Self where I: IntoIterator<Item=Response<T>>

Creates a value from an iterator. Read more