Skip to main content

HubBase

Trait HubBase 

Source
pub trait HubBase {
    type Connector: ConnectRequirements;
    type ConnectorAuth: ConnectRequirements;

    // Required methods
    fn new(
        client: Client<Self::Connector, OutgoingBodyContent>,
        auth: Authenticator<Self::ConnectorAuth>,
    ) -> Self
       where Self: Sized;
    fn get_client(&self) -> &Client<Self::Connector, OutgoingBodyContent>;
    fn get_global_url(&self) -> &str;
    fn get_service_path(&self) -> &str;
    fn get_endpoints() -> &'static Map<&'static str, &'static str>;
    fn get_token(
        &self,
        scopes: &[impl Scope],
    ) -> impl Future<Output = Result<String, ApiCallError>>;
    fn set_region(&mut self, region: impl Into<String>);
    fn get_region(&self) -> Option<&String>;
}

Required Associated Types§

Required Methods§

Source

fn new( client: Client<Self::Connector, OutgoingBodyContent>, auth: Authenticator<Self::ConnectorAuth>, ) -> Self
where Self: Sized,

Source

fn get_client(&self) -> &Client<Self::Connector, OutgoingBodyContent>

Source

fn get_global_url(&self) -> &str

Source

fn get_service_path(&self) -> &str

Source

fn get_endpoints() -> &'static Map<&'static str, &'static str>

Source

fn get_token( &self, scopes: &[impl Scope], ) -> impl Future<Output = Result<String, ApiCallError>>

Source

fn set_region(&mut self, region: impl Into<String>)

Source

fn get_region(&self) -> Option<&String>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§