rama::http::layer::sensitive_headers

Type Alias SetSensitiveHeaders

pub type SetSensitiveHeaders<S> = SetSensitiveRequestHeaders<SetSensitiveResponseHeaders<S>>;
Expand description

Mark headers as sensitive on both requests and responses.

See the module docs for more details.

Aliased Type§

struct SetSensitiveHeaders<S> { /* private fields */ }

Implementations

§

impl<S> SetSensitiveRequestHeaders<S>

pub fn new<I>(inner: S, headers: I) -> SetSensitiveRequestHeaders<S>
where I: IntoIterator<Item = HeaderName>,

pub fn from_shared( inner: S, headers: Arc<[HeaderName]>, ) -> SetSensitiveRequestHeaders<S>

Create a new SetSensitiveRequestHeaders from a shared slice of headers.

pub fn get_ref(&self) -> &S

Gets a reference to the underlying service.

pub fn into_inner(self) -> S

Consumes self, returning the underlying service.

Trait Implementations

§

impl<S> Clone for SetSensitiveRequestHeaders<S>
where S: Clone,

§

fn clone(&self) -> SetSensitiveRequestHeaders<S>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<S> Debug for SetSensitiveRequestHeaders<S>
where S: Debug,

§

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

Formats the value using the given formatter. Read more
§

impl<ReqBody, ResBody, State, S> Service<State, Request<ReqBody>> for SetSensitiveRequestHeaders<S>
where State: Clone + Send + Sync + 'static, S: Service<State, Request<ReqBody>, Response = Response<ResBody>>, ReqBody: Send + 'static, ResBody: Send + 'static,

§

type Response = <S as Service<State, Request<ReqBody>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<State, Request<ReqBody>>>::Error

The type of error returned by the service.
§

async fn serve( &self, ctx: Context<State>, req: Request<ReqBody>, ) -> Result<<SetSensitiveRequestHeaders<S> as Service<State, Request<ReqBody>>>::Response, <SetSensitiveRequestHeaders<S> as Service<State, Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<S, Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.