Struct torn_api::send::ApiProvider  
source · pub struct ApiProvider<'a, C, E>where
    C: ApiClient,
    E: RequestExecutor<C>,{ /* private fields */ }Implementations§
source§impl<'a, C, E> ApiProvider<'a, C, E>where
    C: ApiClient,
    E: RequestExecutor<C>,
 
impl<'a, C, E> ApiProvider<'a, C, E>where
    C: ApiClient,
    E: RequestExecutor<C>,
pub fn new(client: &'a C, executor: E) -> ApiProvider<'a, C, E>
pub async fn user<F>(&self, build: F) -> Result<Response, E::Error>
pub async fn users<F, L, I>(
    &self,
    ids: L,
    build: F
) -> HashMap<I, Result<Response, E::Error>>where
    F: FnOnce(ApiRequestBuilder<Selection>) -> ApiRequestBuilder<Selection>,
    I: ToString + Hash + Eq + Send + Sync,
    L: IntoIterator<Item = I>,
pub async fn faction<F>(&self, build: F) -> Result<Response, E::Error>
pub async fn factions<F, L, I>(
    &self,
    ids: L,
    build: F
) -> HashMap<I, Result<Response, E::Error>>where
    F: FnOnce(ApiRequestBuilder<Selection>) -> ApiRequestBuilder<Selection>,
    I: ToString + Hash + Eq + Send + Sync,
    L: IntoIterator<Item = I>,
pub async fn market<F>(&self, build: F) -> Result<Response, E::Error>
pub async fn markets<F, L, I>(
    &self,
    ids: L,
    build: F
) -> HashMap<I, Result<Response, E::Error>>where
    F: FnOnce(ApiRequestBuilder<MarketSelection>) -> ApiRequestBuilder<MarketSelection>,
    I: ToString + Hash + Eq + Send + Sync,
    L: IntoIterator<Item = I>,
pub async fn torn<F>(&self, build: F) -> Result<Response, E::Error>
pub async fn torns<F, L, I>(
    &self,
    ids: L,
    build: F
) -> HashMap<I, Result<Response, E::Error>>where
    F: FnOnce(ApiRequestBuilder<Selection>) -> ApiRequestBuilder<Selection>,
    I: ToString + Hash + Eq + Send + Sync,
    L: IntoIterator<Item = I>,
pub async fn key<F>(&self, build: F) -> Result<Response, E::Error>
Auto Trait Implementations§
impl<'a, C, E> RefUnwindSafe for ApiProvider<'a, C, E>where
    C: RefUnwindSafe,
    E: RefUnwindSafe,
impl<'a, C, E> Send for ApiProvider<'a, C, E>where
    E: Send,
impl<'a, C, E> Sync for ApiProvider<'a, C, E>where
    E: Sync,
impl<'a, C, E> Unpin for ApiProvider<'a, C, E>where
    E: Unpin,
impl<'a, C, E> UnwindSafe for ApiProvider<'a, C, E>where
    C: RefUnwindSafe,
    E: UnwindSafe,
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