[][src]Struct egg_mode::service::RateLimitStatus

pub struct RateLimitStatus {
    pub direct: HashMap<DirectMethod, Response<()>>,
    pub place: HashMap<PlaceMethod, Response<()>>,
    pub search: HashMap<SearchMethod, Response<()>>,
    pub service: HashMap<ServiceMethod, Response<()>>,
    pub tweet: HashMap<TweetMethod, Response<()>>,
    pub user: HashMap<UserMethod, Response<()>>,
    pub list: HashMap<ListMethod, Response<()>>,
}

Represents the current rate-limit status of many Twitter API calls.

This is organized by module, so for example, if you wanted to see your rate-limit status for tweet::home_timeline, you could access it like this:

use tokio::runtime::current_thread::block_on_all;
use egg_mode::service::TweetMethod;
println!("home_timeline calls remaining: {}",
         status.tweet[&TweetMethod::HomeTimeline].rate_limit_remaining);

It's important to note that not every API method is available through this call. Namely, most calls that require a POST under-the-hood (those that add or modify data with the Twitter service) are not shown through this method. For a listing of methods available for rate-limit querying, see the *Method enums available in egg_mode::service.

Fields

direct: HashMap<DirectMethod, Response<()>>

The rate-limit status for methods in the direct module.

place: HashMap<PlaceMethod, Response<()>>

The rate-limit status for methods in the place module.

search: HashMap<SearchMethod, Response<()>>

The rate-limit status for methods in the search module.

service: HashMap<ServiceMethod, Response<()>>

The rate-limit status for methods in the service module.

tweet: HashMap<TweetMethod, Response<()>>

The rate-limit status for methods in the tweet module.

user: HashMap<UserMethod, Response<()>>

The rate-limit status for methods in the user module.

list: HashMap<ListMethod, Response<()>>

The rate-limit status for methods in the list module.

Trait Implementations

impl Debug for RateLimitStatus[src]

impl<'de> Deserialize<'de> for RateLimitStatus[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self