RequestOptionsBuilder

Trait RequestOptionsBuilder 

Source
pub trait RequestOptionsBuilder: Sized {
    // Required methods
    fn options_mut(&mut self) -> &mut RequestOptions;
    fn options(&self) -> &RequestOptions;

    // Provided methods
    fn headers(self, headers: HeaderMap) -> Self { ... }
    fn header<K, V>(self, key: K, value: V) -> Result<Self, OpenAIError>
       where K: IntoHeaderName,
             V: TryInto<HeaderValue>,
             V::Error: Into<InvalidHeaderValue> { ... }
    fn query<Q: Serialize + ?Sized>(
        self,
        query: &Q,
    ) -> Result<Self, OpenAIError> { ... }
    fn path<P: Into<String>>(self, path: P) -> Result<Self, OpenAIError> { ... }
}
Available on crate feature _api only.
Expand description

Trait for types that can build RequestOptions through fluent API

Required Methods§

Source

fn options_mut(&mut self) -> &mut RequestOptions

Get mutable reference to RequestOptions (for building)

Source

fn options(&self) -> &RequestOptions

Get reference to RequestOptions

Provided Methods§

Source

fn headers(self, headers: HeaderMap) -> Self

Add headers to RequestOptions

Source

fn header<K, V>(self, key: K, value: V) -> Result<Self, OpenAIError>

Add a single header to RequestOptions

Source

fn query<Q: Serialize + ?Sized>(self, query: &Q) -> Result<Self, OpenAIError>

Add query parameters to RequestOptions

Source

fn path<P: Into<String>>(self, path: P) -> Result<Self, OpenAIError>

Add a path to RequestOptions

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<'c, C: Config> RequestOptionsBuilder for AdminAPIKeys<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Assistants<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Audio<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for AuditLogs<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Batches<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Certificates<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Chat<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Chatkit<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Completions<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for ContainerFiles<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Containers<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for ConversationItems<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Conversations<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Embeddings<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for EvalRunOutputItems<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for EvalRuns<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Evals<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Files<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for FineTuning<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for GroupRoles<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for GroupUsers<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Groups<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Images<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Invites<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Messages<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Models<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Moderations<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for ProjectAPIKeys<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for ProjectCertificates<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for ProjectGroupRoles<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for ProjectGroups<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for ProjectRateLimits<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for ProjectRoles<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for ProjectServiceAccounts<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for ProjectUserRoles<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for ProjectUsers<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Projects<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Realtime<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Responses<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Roles<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Runs<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Speech<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Steps<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Threads<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Transcriptions<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Translations<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Uploads<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Usage<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for UserRoles<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Users<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for VectorStoreFileBatches<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for VectorStoreFiles<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for VectorStores<'c, C>

Source§

impl<'c, C: Config> RequestOptionsBuilder for Videos<'c, C>