Skip to main content

HeadersOut

Struct HeadersOut 

Source
pub struct HeadersOut<Kind, Headers>(/* private fields */);
Expand description

Answers with the headers a named product states, beside the body Kind states.

The output twin of reading headers into a product: each member is a header, named by the words its member name states, so cache_control is cache-control. A member stating nothing is not written, and a member stating many values writes one header for each, as set-cookie needs. The handler answers with the product and the body, in that order.

Trait Implementations§

Source§

impl<Kind: Debug, Headers: Debug> Debug for HeadersOut<Kind, Headers>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Kind: Default, Headers: Default> Default for HeadersOut<Kind, Headers>

Source§

fn default() -> Self

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

impl<Interpreter, Headers, Rest, Kind> OutputKindAlg<Interpreter, (Headers, Rest)> for HeadersOut<Kind, Headers>
where Interpreter: HeadersOutAlg + ?Sized, Kind: OutputKindAlg<Interpreter, Rest>,

Source§

type Transform = <Interpreter as HeadersOutAlg>::Headers<<Kind as OutputKindAlg<Interpreter, Rest>>::Transform, Headers>

The concrete converter chosen by Interpreter for this output kind. Read more
Source§

impl<Headers> WrapAlg for HeadersOut<(), Headers>

Source§

type Wrap<Inner> = HeadersOut<Inner, Headers>

The kind this wrapper makes around Inner.

Auto Trait Implementations§

§

impl<Kind, Headers> Freeze for HeadersOut<Kind, Headers>
where PhantomData<fn(Kind, Headers)>: Freeze,

§

impl<Kind, Headers> RefUnwindSafe for HeadersOut<Kind, Headers>
where PhantomData<fn(Kind, Headers)>: RefUnwindSafe,

§

impl<Kind, Headers> Send for HeadersOut<Kind, Headers>
where PhantomData<fn(Kind, Headers)>: Send,

§

impl<Kind, Headers> Sync for HeadersOut<Kind, Headers>
where PhantomData<fn(Kind, Headers)>: Sync,

§

impl<Kind, Headers> Unpin for HeadersOut<Kind, Headers>
where PhantomData<fn(Kind, Headers)>: Unpin,

§

impl<Kind, Headers> UnsafeUnpin for HeadersOut<Kind, Headers>
where PhantomData<fn(Kind, Headers)>: UnsafeUnpin,

§

impl<Kind, Headers> UnwindSafe for HeadersOut<Kind, Headers>
where PhantomData<fn(Kind, Headers)>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<This> HttpOperationExt<This> for This

Source§

fn op<Handler>(&self, handler: Handler) -> Operation<Handler>

Starts an operation declaration without choosing extraction or conversion.

Source§

impl<This> HttpProgramExt<This> for This

Source§

fn program<Program>(&self, program: Program) -> Routes<'_, This>
where This: RouteAlg, Program: HttpProgramAlg<This, Route = <This as RouteAlg>::Route>,

Interprets a named program for further route composition.

Source§

fn compile_http<Program>( &self, program: Program, ) -> <Program as HttpProgramAlg<This>>::Route
where Program: HttpProgramAlg<This>,

Compiles a named HTTP program with this interpreter.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.