Trait GetRequest

Source
pub trait GetRequest: DeserializeOwned {
    const ENDPOINT: &'static str;

    // Provided method
    fn get<'life0, 'async_trait>(
        client: &'life0 OpenAiClient,
    ) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>
       where Self: Send + 'async_trait,
             'life0: 'async_trait { ... }
}

Required Associated Constants§

Source

const ENDPOINT: &'static str

Provided Methods§

Source

fn get<'life0, 'async_trait>( client: &'life0 OpenAiClient, ) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait,

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§

Source§

impl GetRequest for FileListResponse

Source§

const ENDPOINT: &'static str = "/files"

Source§

impl GetRequest for FineTuneListResponse

Source§

const ENDPOINT: &'static str = "/fine-tunes"

Source§

impl GetRequest for ModelListResponse

Source§

const ENDPOINT: &'static str = "/models"