pub enum PredicateView<'a> {
L4 {
conn: &'a Arc<ConnContext>,
peek: Option<&'a [u8]>,
},
L7Req {
conn: &'a Arc<ConnContext>,
req: &'a Request,
},
}Variants§
Implementations§
Source§impl<'a> PredicateView<'a>
impl<'a> PredicateView<'a>
Sourcepub fn build(
conn: &'a Arc<ConnContext>,
req: Option<&'a Request>,
_l4: Option<&'a L4Conn>,
peek: Option<&'a [u8]>,
) -> Self
pub fn build( conn: &'a Arc<ConnContext>, req: Option<&'a Request>, _l4: Option<&'a L4Conn>, peek: Option<&'a [u8]>, ) -> Self
Build the phase-appropriate view the executor hands to
PredicateInst::test. Picks L7Req when a Request is in scope
(phase L7Request), otherwise falls back to L4.
peek carries the bytes the listener-side prelude buffered on
the connection — see spec/architecture/06-l4.md § Protocol
detection. The executor extracts it from ConnContext.user
(where the listener stashed a PeekResult) and forwards a
borrow with a lifetime that outlives this view.
Auto Trait Implementations§
impl<'a> Freeze for PredicateView<'a>
impl<'a> !RefUnwindSafe for PredicateView<'a>
impl<'a> !Send for PredicateView<'a>
impl<'a> !Sync for PredicateView<'a>
impl<'a> Unpin for PredicateView<'a>
impl<'a> UnsafeUnpin for PredicateView<'a>
impl<'a> !UnwindSafe for PredicateView<'a>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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