Struct vault_api::Context [] [src]

pub struct Context {
    pub x_span_id: Option<String>,
    pub authorization: Option<Authorization>,
    pub auth_data: Option<AuthData>,
}

Request context, both as received in a server handler or as sent in a client request. When REST microservices are chained, the Context passes data from the server API to any further HTTP requests.

Fields

Tracking ID when passing a request to another microservice.

Authorization data, filled in from middlewares.

Raw authentication data, for use in making HTTP requests as a client.

Methods

impl Context
[src]

[src]

Create a new, empty, Context.

[src]

Create a Context with a given span ID.

[src]

Set Basic authentication

[src]

Set Bearer token authentication

[src]

Set ApiKey authentication

Trait Implementations

impl Clone for Context
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Context
[src]

[src]

Formats the value using the given formatter. Read more

impl Default for Context
[src]

[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl Send for Context

impl Sync for Context