Skip to main content

Hub

Trait Hub 

Source
pub trait Hub:
    HubBase
    + Debug
    + Clone {
    // Provided methods
    fn call<'a, 'b, T>(
        &'a self,
        api_call: impl ApiCall<'b, T, Self> + 'b,
    ) -> impl Future<Output = Result<T, ApiCallError>>
       where T: Debug + DeserializeOwned,
             Self: Sized,
             'a: 'b { ... }
    fn get_base_url(&self) -> &str { ... }
    fn get_url_for_region(&self, region: &str) -> &str { ... }
}

Provided Methods§

Source

fn call<'a, 'b, T>( &'a self, api_call: impl ApiCall<'b, T, Self> + 'b, ) -> impl Future<Output = Result<T, ApiCallError>>
where T: Debug + DeserializeOwned, Self: Sized, 'a: 'b,

Source

fn get_base_url(&self) -> &str

Source

fn get_url_for_region(&self, region: &str) -> &str

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: HubBase + Debug + Clone> Hub for T