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

pub struct NormalizedParameter { /* fields omitted */ }

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.

Methods

impl NormalizedParameter[src]

pub fn new() -> Self[src]

Create an empty map.

pub fn insert_or_poison(
    &mut self,
    key: Cow<'static, str>,
    val: Cow<'static, str>
)
[src]

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

impl QueryParameter for NormalizedParameter[src]

impl Default for NormalizedParameter[src]

impl Clone for NormalizedParameter[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for NormalizedParameter[src]

impl<K, V> FromIterator<(K, V)> for NormalizedParameter where
    K: Into<Cow<'static, str>>,
    V: Into<Cow<'static, str>>, 
[src]

impl Borrow<dyn QueryParameter + 'static> for NormalizedParameter[src]

impl<'de> Deserialize<'de> for NormalizedParameter[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Erased for T

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.

impl<T> DebugAny for T where
    T: Any + Debug

impl<T> CloneAny for T where
    T: Clone + Any

impl<T> UnsafeAny for T where
    T: Any

impl<T> IntoCollection<T> for T

impl<T, I> AsResult<T, I> for T where
    I: Input,