[][src]Trait brawl_api::traits::FetchInto

pub trait FetchInto<T>: Sized {
    fn fetch_into(&self, client: &Client) -> Result<T>;
fn a_fetch_into<'life0, 'life1, 'async_trait>(
        &'life0 self,
        client: &'life1 Client
    ) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>>
    where
        T: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }

A trait indicating that this type can be converted into another by fetching from the API. Note that FetchFrom should be implemented, in order to apply the respective blanket implementation of this trait.

Required methods

fn fetch_into(&self, client: &Client) -> Result<T>

(Sync) Attempts to request to the API and return a new instance of the type being turned into.

Errors

See the respective into-type's fetch implementation (or PropFetchable/PropLimFetchable implementation).

Examples

See [FetchFrom::<T>::fetch_from].

fn a_fetch_into<'life0, 'life1, 'async_trait>(
    &'life0 self,
    client: &'life1 Client
) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>> where
    T: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

(Async) Attempts to request to the API and return a new instance of the type being turned into.

Errors

See the respective into-type's a_fetch implementation (or PropFetchable/PropLimFetchable implementation).

Examples

See [FetchFrom::<T>::a_fetch_from].

Loading content...

Implementors

impl<T, U> FetchInto<U> for T where
    T: Sync + Send,
    U: FetchFrom<T> + Sync + Send
[src]

Loading content...