pub struct PgPolicy {
pub polname: SmolStr,
pub polrelid: SmolStr,
pub polcmd: PgPolicyPolcmd,
pub polpermissive: bool,
pub polroles: Vec<Option<SmolStr>>,
pub polqual: Option<SmolStr>,
pub polwithcheck: Option<SmolStr>,
pub description: Option<SmolStr>,
}Expand description
The DDL-only contents of pg_policy
Fields§
§polname: SmolStrname The name of the policy
polrelid: SmolStroid (references pg_class.oid) The table to which the policy applies
polcmd: PgPolicyPolcmdchar The command type to which the policy is applied: r for SELECT, a for INSERT, w for UPDATE, d for DELETE, or * for all
polpermissive: boolbool Is the policy permissive or restrictive?
polroles: Vec<Option<SmolStr>>oid[] (references pg_authid.oid) The roles to which the policy is applied; zero means PUBLIC (and normally appears alone in the array)
polqual: Option<SmolStr>pg_node_tree The expression tree to be added to the security barrier qualifications for queries that use the table
polwithcheck: Option<SmolStr>pg_node_tree The expression tree to be added to the WITH CHECK qualifications for queries that attempt to add rows to the table
description: Option<SmolStr>text The comment from pg_description
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PgPolicy
impl<'de> Deserialize<'de> for PgPolicy
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PgPolicy, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PgPolicy, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for PgPolicy
impl Serialize for PgPolicy
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for PgPolicy
impl StructuralPartialEq for PgPolicy
Auto Trait Implementations§
impl Freeze for PgPolicy
impl RefUnwindSafe for PgPolicy
impl Send for PgPolicy
impl Sync for PgPolicy
impl Unpin for PgPolicy
impl UnsafeUnpin for PgPolicy
impl UnwindSafe for PgPolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.