GetNoStream

Trait GetNoStream 

Source
pub trait GetNoStream:
    Get
    + Sync
    + Send {
    type Response: DeserializeOwned + FromStr<Err = OapiError> + Send + Sync;

    // Provided methods
    fn get_response_string(
        &self,
        base_url: &str,
        key: &str,
    ) -> impl Future<Output = Result<String, OapiError>> + Send + Sync { ... }
    fn get_response(
        &self,
        base_url: &str,
        key: &str,
    ) -> impl Future<Output = Result<Self::Response, OapiError>> + Send + Sync { ... }
}
Expand description

Trait for non-streaming GET requests

Required Associated Types§

Provided Methods§

Source

fn get_response_string( &self, base_url: &str, key: &str, ) -> impl Future<Output = Result<String, OapiError>> + Send + Sync

Sends a GET request to the specified URL with the provided api-key.

Source

fn get_response( &self, base_url: &str, key: &str, ) -> impl Future<Output = Result<Self::Response, OapiError>> + Send + Sync

Sends a GET request and deserializes the response

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§