Struct oxide_auth::endpoint::NormalizedParameter[][src]

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

The query parameter normal form.

When a request wants to give access to its query or body parameters by reference, it can do so by a reference of the particular trait. But when the representation of the query is not stored in the memory associated with the request, it needs to be allocated to outlive the borrow on the request. This allocation may as well perform the minimization/normalization into a representation actually consumed by the backend. This normal form thus encapsulates the associated clone-into-normal form by various possible constructors from references [WIP].

This gives rise to a custom Cow<QueryParameter> instance by requiring that normalization into memory with unrelated lifetime is always possible.

Internally a hashmap but this may change due to optimizations.

Implementations

Create an empty map.

Insert a key-value-pair or mark key as dead if already present.

Since each key must appear at most once, we do not remove it from the map but instead mark the key as having a duplicate entry.

Trait Implementations

Immutably borrows from an owned value. Read more

Immutably borrows from an owned value. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Creates a value from an iterator. Read more

Get the unique value associated with a key. Read more

Guarantees that one can grab an owned copy.

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.

Performs the conversion.

Should always be Self

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)

recently added

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.