pub struct Validate<Inner = PipeHandle, Op = ValidateOp> {
pub inner: Inner,
/* private fields */
}Expand description
Predicate/schema-gated admission middleware. Generic over the inner pipe AND
the check op. The std default op is the HTTP ValidateOp (proxima-config’s
schema module); under no_std+alloc that type is absent, so the default
falls back to () and callers name their own Checkable op explicitly.
Fields§
§inner: InnerImplementations§
Source§impl Validate<PipeHandle, ValidateOp>
impl Validate<PipeHandle, ValidateOp>
pub fn from_schema( inner: PipeHandle, schema: Schema, schemas: Arc<SchemaRegistry>, ) -> Self
pub fn from_spec( inner: PipeHandle, value: &Value, schemas: &Arc<SchemaRegistry>, ) -> Result<Self, ProximaError>
Trait Implementations§
Source§impl<Op> Pipe for Validate<ThreadLocalPipeHandle, Op>
impl<Op> Pipe for Validate<ThreadLocalPipeHandle, Op>
Source§type Err = ProximaError
type Err = ProximaError
Auto Trait Implementations§
impl<Inner, Op> Freeze for Validate<Inner, Op>
impl<Inner, Op> RefUnwindSafe for Validate<Inner, Op>where
Inner: RefUnwindSafe,
Op: RefUnwindSafe,
impl<Inner, Op> Send for Validate<Inner, Op>
impl<Inner, Op> Sync for Validate<Inner, Op>
impl<Inner, Op> Unpin for Validate<Inner, Op>
impl<Inner, Op> UnsafeUnpin for Validate<Inner, Op>where
Inner: UnsafeUnpin,
Op: UnsafeUnpin,
impl<Inner, Op> UnwindSafe for Validate<Inner, Op>where
Inner: UnwindSafe,
Op: 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.