pub trait CursorSecureExtract {
// Required methods
fn extract_whitelisted_fields(
&self,
fields: &[String],
) -> Result<Vec<CursorValue>, CursorError>;
fn encode(_cursor: &Cursor) -> Result<String, CursorError>;
fn decode(_encoded: &str) -> Result<Vec<FilterValue>, CursorError>;
}Expand description
Security-First Cursor Field Whitelist Trait
This trait enforces a whitelist-based security model for cursor pagination fields. Implementors MUST explicitly whitelist each allowed field to prevent field injection attacks.
Required Methods§
fn extract_whitelisted_fields( &self, fields: &[String], ) -> Result<Vec<CursorValue>, CursorError>
Sourcefn encode(_cursor: &Cursor) -> Result<String, CursorError>
fn encode(_cursor: &Cursor) -> Result<String, CursorError>
Encode cursor to string token (JSON feature disabled)
Sourcefn decode(_encoded: &str) -> Result<Vec<FilterValue>, CursorError>
fn decode(_encoded: &str) -> Result<Vec<FilterValue>, CursorError>
Decode string token to FilterValue vector (JSON feature disabled)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".