Trait rama::http::layer::set_header::MakeHeaderValueFn

pub trait MakeHeaderValueFn<S, T, A>: Send + Sync + 'static {
    // Required method
    fn call(
        &self,
        ctx: Context<S>,
        message: T,
    ) -> impl Future<Output = (Context<S>, T, Option<HeaderValue>)> + Send;
}
Expand description

Functional version of MakeHeaderValue.

Required Methods§

fn call( &self, ctx: Context<S>, message: T, ) -> impl Future<Output = (Context<S>, T, Option<HeaderValue>)> + Send

Try to create a header value from the request or response.

Object Safety§

This trait is not object safe.

Implementors§

§

impl<F, Fut, S, T> MakeHeaderValueFn<S, T, ((), T)> for F
where S: Send + Sync + 'static, T: Send + 'static, F: Fn(T) -> Fut + Send + Sync + 'static, Fut: Future<Output = (T, Option<HeaderValue>)> + Send + 'static,

§

impl<F, Fut, S, T> MakeHeaderValueFn<S, T, (Context<S>, T)> for F
where F: Fn(Context<S>, T) -> Fut + Send + Sync + 'static, Fut: Future<Output = (Context<S>, T, Option<HeaderValue>)> + Send + 'static,

§

impl<F, Fut, S, T> MakeHeaderValueFn<S, T, (Context<S>,)> for F
where S: Send + Sync + 'static, T: Send + 'static, F: Fn(Context<S>) -> Fut + Send + Sync + 'static, Fut: Future<Output = (Context<S>, Option<HeaderValue>)> + Send + 'static,

§

impl<F, Fut, S, T> MakeHeaderValueFn<S, T, ()> for F
where S: Send + Sync + 'static, T: Send + 'static, F: Fn() -> Fut + Send + Sync + 'static, Fut: Future<Output = Option<HeaderValue>> + Send + 'static,