pub trait Gate:
Send
+ Sync
+ Debug {
// Required method
fn check(&self, req: &GateRequest) -> Result<GateDecision, GateError>;
// Provided method
fn impl_name(&self) -> &'static str { ... }
}Expand description
Authorization gate consulted before each verb dispatch.
Implementations return policy denials as decisions and infrastructure failures as errors. See
crates/khive-gate/docs/api/gate-evaluation.md.
Required Methods§
Sourcefn check(&self, req: &GateRequest) -> Result<GateDecision, GateError>
fn check(&self, req: &GateRequest) -> Result<GateDecision, GateError>
Evaluate req, returning an allow/deny decision or a backend GateError.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".