[][src]Struct aahc::Metadata

pub struct Metadata { /* fields omitted */ }

Metadata about a request.

Certain information about a request is needed in order to properly process the corresponding response. In order to decouple request and response processing, that information is packed into a Metadata structure and returned to the application. The application must then pass the Metadata structure back in when preparing to receive the response.

This type does not have any public API. The application cannot examine or modify its contents. It is intended to be stashed somewhere when the application finishes sending the request and then passed, unmodified, when the application begins receiving the response.

In the simple case of straight-line code with no pipelining, the object can simply be immediately passed into receive_headers. More complex situations may call for more complex handling; for example, if pipelining is in use, the application likely needs to maintain a FIFO queue of Metadata structures, each being pushed to the queue when the request finishes and popped from the queue when ready to read the corresponding response. Or, if it is expected that the server may take some time to start generating a response, the application may wish to free most of the resources associated with the request and “park” the socket until the response begins arriving; in such a situation, the Metadata structure must be stored along with the socket and is very lightweight.

Trait Implementations

impl Clone for Metadata[src]

impl Copy for Metadata[src]

impl Debug for Metadata[src]

impl Eq for Metadata[src]

impl PartialEq<Metadata> for Metadata[src]

impl StructuralEq for Metadata[src]

impl StructuralPartialEq for Metadata[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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.