pub struct AnthropicClientConfigBuilder<S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> AnthropicClientConfigBuilder<S>
impl<S: State> AnthropicClientConfigBuilder<S>
Sourcepub fn build(self) -> AnthropicClientConfigwhere
S: IsComplete,
pub fn build(self) -> AnthropicClientConfigwhere
S: IsComplete,
Finish building and return the requested object
Sourcepub fn base_url(
self,
value: impl Into<String>,
) -> AnthropicClientConfigBuilder<SetBaseUrl<S>>where
S::BaseUrl: IsUnset,
pub fn base_url(
self,
value: impl Into<String>,
) -> AnthropicClientConfigBuilder<SetBaseUrl<S>>where
S::BaseUrl: IsUnset,
Sourcepub fn maybe_base_url(
self,
value: Option<impl Into<String>>,
) -> AnthropicClientConfigBuilder<SetBaseUrl<S>>where
S::BaseUrl: IsUnset,
pub fn maybe_base_url(
self,
value: Option<impl Into<String>>,
) -> AnthropicClientConfigBuilder<SetBaseUrl<S>>where
S::BaseUrl: IsUnset,
Sourcepub fn default_headers(
self,
value: Vec<(String, String)>,
) -> AnthropicClientConfigBuilder<SetDefaultHeaders<S>>where
S::DefaultHeaders: IsUnset,
pub fn default_headers(
self,
value: Vec<(String, String)>,
) -> AnthropicClientConfigBuilder<SetDefaultHeaders<S>>where
S::DefaultHeaders: IsUnset,
Optional (Some / Option setters).
Default: <Vec<(String, String)> as Default>::default().
Headers sent with every request, after those in ANTHROPIC_CUSTOM_HEADERS; a later header
replaces an earlier one with the same name. Pin the API version with
("anthropic-version", "2023-06-01"); betas given as anthropic-beta are kept when the
provider adds its own.
Sourcepub fn maybe_default_headers(
self,
value: Option<Vec<(String, String)>>,
) -> AnthropicClientConfigBuilder<SetDefaultHeaders<S>>where
S::DefaultHeaders: IsUnset,
pub fn maybe_default_headers(
self,
value: Option<Vec<(String, String)>>,
) -> AnthropicClientConfigBuilder<SetDefaultHeaders<S>>where
S::DefaultHeaders: IsUnset,
Optional (Some / Option setters).
Default: <Vec<(String, String)> as Default>::default().
Headers sent with every request, after those in ANTHROPIC_CUSTOM_HEADERS; a later header
replaces an earlier one with the same name. Pin the API version with
("anthropic-version", "2023-06-01"); betas given as anthropic-beta are kept when the
provider adds its own.
Sourcepub fn max_retries(
self,
value: u32,
) -> AnthropicClientConfigBuilder<SetMaxRetries<S>>where
S::MaxRetries: IsUnset,
pub fn max_retries(
self,
value: u32,
) -> AnthropicClientConfigBuilder<SetMaxRetries<S>>where
S::MaxRetries: IsUnset,
Sourcepub fn maybe_max_retries(
self,
value: Option<u32>,
) -> AnthropicClientConfigBuilder<SetMaxRetries<S>>where
S::MaxRetries: IsUnset,
pub fn maybe_max_retries(
self,
value: Option<u32>,
) -> AnthropicClientConfigBuilder<SetMaxRetries<S>>where
S::MaxRetries: IsUnset,
Sourcepub fn timeout(
self,
value: Duration,
) -> AnthropicClientConfigBuilder<SetTimeout<S>>where
S::Timeout: IsUnset,
pub fn timeout(
self,
value: Duration,
) -> AnthropicClientConfigBuilder<SetTimeout<S>>where
S::Timeout: IsUnset,
Sourcepub fn maybe_timeout(
self,
value: Option<Duration>,
) -> AnthropicClientConfigBuilder<SetTimeout<S>>where
S::Timeout: IsUnset,
pub fn maybe_timeout(
self,
value: Option<Duration>,
) -> AnthropicClientConfigBuilder<SetTimeout<S>>where
S::Timeout: IsUnset,
Auto Trait Implementations§
impl<S> Freeze for AnthropicClientConfigBuilder<S>
impl<S> RefUnwindSafe for AnthropicClientConfigBuilder<S>
impl<S> Send for AnthropicClientConfigBuilder<S>
impl<S> Sync for AnthropicClientConfigBuilder<S>
impl<S> Unpin for AnthropicClientConfigBuilder<S>
impl<S> UnsafeUnpin for AnthropicClientConfigBuilder<S>
impl<S> UnwindSafe for AnthropicClientConfigBuilder<S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more