pub struct Transform<Inner = PipeHandle, InOp = RequestOp, OutOp = ResponseOp> {
pub inner: Inner,
/* private fields */
}Expand description
Request/response transformation middleware. Generic over the inner pipe
AND the op types; the std default type parameters (the HTTP RequestOp /
ResponseOp, which carry regex::Regex) keep all existing call sites
unchanged. Under no_std+alloc the HTTP op types are absent, so the defaults
fall back to (); callers name their own op types explicitly.
Fields§
§inner: InnerImplementations§
Source§impl<Inner, InOp, OutOp> Transform<Inner, InOp, OutOp>
impl<Inner, InOp, OutOp> Transform<Inner, InOp, OutOp>
pub fn new(inner: Inner) -> Self
pub fn with_request_op(self, op: InOp) -> Self
pub fn with_response_op(self, op: OutOp) -> Self
Source§impl Transform<PipeHandle>
impl Transform<PipeHandle>
pub fn from_spec(inner: PipeHandle, value: &Value) -> Result<Self, ProximaError>
Trait Implementations§
Source§impl<InOp, OutOp> Pipe for Transform<ThreadLocalPipeHandle, InOp, OutOp>
impl<InOp, OutOp> Pipe for Transform<ThreadLocalPipeHandle, InOp, OutOp>
Source§type Err = ProximaError
type Err = ProximaError
Auto Trait Implementations§
impl<Inner, InOp, OutOp> Freeze for Transform<Inner, InOp, OutOp>
impl<Inner, InOp, OutOp> RefUnwindSafe for Transform<Inner, InOp, OutOp>
impl<Inner, InOp, OutOp> Send for Transform<Inner, InOp, OutOp>
impl<Inner, InOp, OutOp> Sync for Transform<Inner, InOp, OutOp>
impl<Inner, InOp, OutOp> Unpin for Transform<Inner, InOp, OutOp>
impl<Inner, InOp, OutOp> UnsafeUnpin for Transform<Inner, InOp, OutOp>
impl<Inner, InOp, OutOp> UnwindSafe for Transform<Inner, InOp, OutOp>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<Implementor> Handler for Implementor
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<P> PipeExt for Pwhere
P: Pipe,
impl<P> PipeExt for Pwhere
P: Pipe,
Source§fn and_then<Next>(self, next: Next) -> AndThen<Self, Next>
fn and_then<Next>(self, next: Next) -> AndThen<Self, Next>
self.and_then(next) is AndThen::new(self, next) — reads
left-to-right at the call site.Source§fn fanout(self, other: Self) -> FanOut<Self, AllOrNothing>
fn fanout(self, other: Self) -> FanOut<Self, AllOrNothing>
Broadcast to
self and other, all-or-nothing.