Skip to main content

DrizzlePolicy

Trait DrizzlePolicy 

Source
pub trait DrizzlePolicy:
    Send
    + Sync
    + 'static {
    const POLICY_NAME: &'static str;
    const AS_CLAUSE: Option<&'static str> = None;
    const FOR_CLAUSE: Option<&'static str> = None;
    const TO: &'static [&'static str] = _;
    const USING: Option<&'static str> = None;
    const WITH_CHECK: Option<&'static str> = None;

    // Required method
    fn table_ref() -> &'static TableRef;
}
Expand description

Core traits (SQLTable, SQLColumn, SQLSchema, SQLModel, etc.). Compile-time PostgreSQL row-level security policy metadata.

Implementing this trait automatically provides SQLPolicyInfo via a blanket implementation.

Required Associated Constants§

Source

const POLICY_NAME: &'static str

Policy name.

Provided Associated Constants§

Source

const AS_CLAUSE: Option<&'static str> = None

AS clause (PERMISSIVE or RESTRICTIVE).

Source

const FOR_CLAUSE: Option<&'static str> = None

FOR clause (ALL, SELECT, INSERT, UPDATE, or DELETE).

Source

const TO: &'static [&'static str] = _

TO roles.

Source

const USING: Option<&'static str> = None

USING expression.

Source

const WITH_CHECK: Option<&'static str> = None

WITH CHECK expression.

Required Methods§

Source

fn table_ref() -> &'static TableRef

The table this policy belongs to.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§