Struct aws_http::user_agent::AwsUserAgent[][src]

pub struct AwsUserAgent { /* fields omitted */ }
Expand description

AWS User Agent

Ths struct should be inserted into the PropertyBag during operation construction. UserAgentStage reads AwsUserAgent from the property bag and sets the User-Agent and x-amz-user-agent headers.

Implementations

Load a User Agent configuration from the environment

This utilizes BUILD_METADATA from aws_types to capture the Rust version & target platform. ApiMetadata provides the version & name of the specific service.

For test purposes, construct an environment-independent User Agent

Without this, running CI on a different platform would produce different user agent strings

Sets the app name for the user agent.

Sets the app name for the user agent.

Generate a new-style user agent style header

This header should be set at x-amz-user-agent

Generate an old-style User-Agent header for backward compatibility

This header is intended to be set at User-Agent

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more