Trait Config

Source
pub trait Config:
    Debug
    + Clone
    + Send
    + Sync {
    // Required methods
    fn headers(&self) -> Result<HeaderMap, Error>;
    fn url(&self, path: &str) -> String;
    fn query(&self) -> Vec<(&str, &str)>;
    fn base_url(&self) -> &str;
    fn api_key(&self) -> Option<&SecretString>;

    // Provided method
    fn stream_done_message(&self) -> &'static str { ... }
}

Required Methods§

Source

fn headers(&self) -> Result<HeaderMap, Error>

Source

fn url(&self, path: &str) -> String

Source

fn query(&self) -> Vec<(&str, &str)>

Source

fn base_url(&self) -> &str

Source

fn api_key(&self) -> Option<&SecretString>

Provided Methods§

Source

fn stream_done_message(&self) -> &'static str

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§