pub trait Validate {
// Required method
fn validate(&self) -> Result<(), InvalidError>;
}Expand description
A capped request type that enforces its own size and shape limits, so the
cap logic lives once in the wire crate and every port and both servers get
the identical check by construction rather than each remembering to compare
against crate::limits. The SDK calls it before encoding, the servers call
it after decode and before execution.
Required Methods§
Sourcefn validate(&self) -> Result<(), InvalidError>
fn validate(&self) -> Result<(), InvalidError>
Reject a request that violates a pinned cap or a structural rule.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".