pub struct Diff<Inner = PipeHandle> {
pub left: Inner,
pub right: Inner,
pub replay_cap_bytes: usize,
}Expand description
fan-out → fan-in diff. send the same Request through left and
right, collect both responses, emit a single JSON diff describing
where they disagree. used to A/B two implementations against the
same input — record once, run both, see which bytes diverged.
the request body is teed (via the existing backpressure-aware tee) so
both branches see identical input bytes. each branch consumes the
body to completion before its response body is collected.
fan-out diff between two inners. Generic over the inner handle:
Diff<PipeHandle> impls Handler; Diff<ThreadLocalPipeHandle>
impls ThreadLocalHandler. Both branches must share handle type
because the resulting future is one Send-ness.
Fields§
§left: Inner§right: Inner§replay_cap_bytes: usizeImplementations§
Trait Implementations§
Source§impl Pipe for Diff<ThreadLocalPipeHandle>
impl Pipe for Diff<ThreadLocalPipeHandle>
Source§type Err = ProximaError
type Err = ProximaError
Auto Trait Implementations§
impl<Inner> Freeze for Diff<Inner>where
Inner: Freeze,
impl<Inner> RefUnwindSafe for Diff<Inner>where
Inner: RefUnwindSafe,
impl<Inner> Send for Diff<Inner>where
Inner: Send,
impl<Inner> Sync for Diff<Inner>where
Inner: Sync,
impl<Inner> Unpin for Diff<Inner>where
Inner: Unpin,
impl<Inner> UnsafeUnpin for Diff<Inner>where
Inner: UnsafeUnpin,
impl<Inner> UnwindSafe for Diff<Inner>where
Inner: UnwindSafe,
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.