pub struct FilterSegment {
pub predicate: FilterPredicate,
pub body: OutcomeSegment,
}Expand description
Outcome-aware structural EIP segment for the Filter pattern.
When the predicate passes, delegates to body (which can return
Completed, Stopped, or Failed). When the predicate fails,
returns Completed(original_exchange) — the exchange is returned
as-is and the body is skipped entirely.
Unlike FilterService (which operates at the Tower layer and cannot
preserve Stopped(ex) with mutations), FilterSegment operates at
the PipelineOutcome layer and preserves the exchange at the Stop
point including all mutations.
Fields§
§predicate: FilterPredicate§body: OutcomeSegmentTrait Implementations§
Source§impl Clone for FilterSegment
impl Clone for FilterSegment
Source§impl OutcomePipeline for FilterSegment
impl OutcomePipeline for FilterSegment
Source§fn clone_box(&self) -> Box<dyn OutcomePipeline>
fn clone_box(&self) -> Box<dyn OutcomePipeline>
Clone the segment into a new boxed instance. Required because
Box<dyn OutcomePipeline> cannot directly derive Clone.Auto Trait Implementations§
impl !RefUnwindSafe for FilterSegment
impl !Sync for FilterSegment
impl !UnwindSafe for FilterSegment
impl Freeze for FilterSegment
impl Send for FilterSegment
impl Unpin for FilterSegment
impl UnsafeUnpin for FilterSegment
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