Skip to main content

SQLPolicyInfo

Trait SQLPolicyInfo 

Source
pub trait SQLPolicyInfo:
    Any
    + Send
    + Sync {
    // Required methods
    fn table(&self) -> &'static TableRef;
    fn name(&self) -> &'static str;
    fn as_clause(&self) -> Option<&'static str>;
    fn for_clause(&self) -> Option<&'static str>;
    fn to(&self) -> &'static [&'static str];
    fn using(&self) -> Option<&'static str>;
    fn with_check(&self) -> Option<&'static str>;
}
Expand description

Runtime metadata of a policy, usable as a trait object. See DrizzlePolicy for what each field means.

Required Methods§

Source

fn table(&self) -> &'static TableRef

The table the policy applies to.

Source

fn name(&self) -> &'static str

The policy name.

Source

fn as_clause(&self) -> Option<&'static str>

PERMISSIVE or RESTRICTIVE, if set.

Source

fn for_clause(&self) -> Option<&'static str>

The command the policy covers, if set.

Source

fn to(&self) -> &'static [&'static str]

Roles in the TO clause.

Source

fn using(&self) -> Option<&'static str>

USING expression, as SQL text.

Source

fn with_check(&self) -> Option<&'static str>

WITH CHECK expression, as SQL text.

Trait Implementations§

Source§

impl Debug for dyn SQLPolicyInfo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§