pub struct MetadataClientBuilder { /* private fields */ }Expand description
Builder for MetadataClient.
Required: an AuthSession via auth. Everything
else has a sensible default.
Implementations§
Source§impl MetadataClientBuilder
impl MetadataClientBuilder
Sourcepub fn auth(self, auth: SharedAuth) -> Self
pub fn auth(self, auth: SharedAuth) -> Self
Sets the auth session (any AuthSession wrapped in Arc).
Required.
Sourcepub fn api_version(self, version: impl Into<String>) -> Self
pub fn api_version(self, version: impl Into<String>) -> Self
Sets the Metadata API version, e.g. "66.0". Defaults to
DEFAULT_API_VERSION. Note: SOAP endpoint paths use the bare
number without a v prefix.
Sourcepub fn user_agent(self, ua: impl Into<String>) -> Self
pub fn user_agent(self, ua: impl Into<String>) -> Self
Overrides the default User-Agent header. Ignored if
http_client is set.
Sourcepub fn http_client(self, client: Client) -> Self
pub fn http_client(self, client: Client) -> Self
Supplies a pre-configured reqwest::Client. Useful for sharing
a connection pool across multiple SDK clients or for installing
custom middleware. When provided, the builder’s user_agent
setting is ignored — configure that on the supplied client.
Sourcepub fn retry_policy(self, policy: RetryPolicy) -> Self
pub fn retry_policy(self, policy: RetryPolicy) -> Self
Sets the RetryPolicy for transient-failure handling.
Sourcepub fn build(self) -> MetadataResult<MetadataClient>
pub fn build(self) -> MetadataResult<MetadataClient>
Finalizes the builder.
Trait Implementations§
Source§impl Default for MetadataClientBuilder
impl Default for MetadataClientBuilder
Source§fn default() -> MetadataClientBuilder
fn default() -> MetadataClientBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MetadataClientBuilder
impl !RefUnwindSafe for MetadataClientBuilder
impl Send for MetadataClientBuilder
impl Sync for MetadataClientBuilder
impl Unpin for MetadataClientBuilder
impl UnsafeUnpin for MetadataClientBuilder
impl !UnwindSafe for MetadataClientBuilder
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
Mutably borrows from an owned value. Read more