pub trait Transformer<'a> {
// Required method
fn transform(cx: &'a mut NgynContext<'_>) -> Self
where Self: Sized;
}Expand description
Represents a transformer trait.
Required Methods§
Sourcefn transform(cx: &'a mut NgynContext<'_>) -> Selfwhere
Self: Sized,
fn transform(cx: &'a mut NgynContext<'_>) -> Selfwhere
Self: Sized,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl Transformer<'_> for Request<Vec<u8>>
impl<'a, 'b> Transformer<'a> for Body<'b>where
'a: 'b,
impl<'a, 'b> Transformer<'a> for Param<'b>where
'a: 'b,
impl<'a, 'q> Transformer<'a> for Query<'q>where
'a: 'q,
impl<'a> Transformer<'a> for &'a HeaderMap
A shorthand for transforming a HeaderMap reference.
This is useful when you need to access the headers of a response.
impl<'a> Transformer<'a> for &'a NgynContext<'a>
impl<'a> Transformer<'a> for &'a Request<Vec<u8>>
impl<'a> Transformer<'a> for &'a Response<Full<Bytes>>
impl<'a> Transformer<'a> for &'a mut HeaderMap
A shorthand for transforming a mutable HeaderMap reference.
This is useful when you want to add or remove headers from a response.