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§
Sourcefn options_mut(&mut self) -> &mut RequestOptions
fn options_mut(&mut self) -> &mut RequestOptions
Get mutable reference to RequestOptions (for building)
Sourcefn options(&self) -> &RequestOptions
fn options(&self) -> &RequestOptions
Get reference to RequestOptions
Provided Methods§
Sourcefn header<K, V>(self, key: K, value: V) -> Result<Self, OpenAIError>
fn header<K, V>(self, key: K, value: V) -> Result<Self, OpenAIError>
Add a single header 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.