Skip to main content

AdmissionGuard

Trait AdmissionGuard 

Source
pub trait AdmissionGuard {
    // Required method
    fn admit(
        &self,
        descriptor: &OperationDescriptor,
        input: &[u8],
        cx: &mut Ctx<'_>,
    ) -> AdmissionDecision;
}
Expand description

Pre-handler admission guard run by crate::Core before handler dispatch.

Required Methods§

Source

fn admit( &self, descriptor: &OperationDescriptor, input: &[u8], cx: &mut Ctx<'_>, ) -> AdmissionDecision

Decide whether to admit the resolved call before the handler runs.

The guard may attach opaque receipt metadata to cx (e.g. a denial reason, or correlation identity) regardless of the decision; the runtime drains that metadata into the recorded receipt.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<F> AdmissionGuard for F
where F: Fn(&OperationDescriptor, &[u8], &mut Ctx<'_>) -> AdmissionDecision,