pub enum AlterDefaultPrivilegesAction {
Grant {
privileges: Privileges,
object_type: AlterDefaultPrivilegesObjectType,
grantees: Vec<Grantee>,
with_grant_option: bool,
},
Revoke {
grant_option_for: bool,
privileges: Privileges,
object_type: AlterDefaultPrivilegesObjectType,
grantees: Vec<Grantee>,
cascade: Option<CascadeOption>,
},
}Expand description
The abbreviated GRANT/REVOKE body of ALTER DEFAULT PRIVILEGES.
PostgreSQL spells out two body forms; this enum mirrors them while
reusing Privileges and Grantee so consumers don’t have to
special-case the abbreviated syntax.
Variants§
Grant
GRANT <privileges> ON <object_type> TO <grantees> [WITH GRANT OPTION]
Fields
§
privileges: PrivilegesPrivileges granted (ALL [PRIVILEGES] or a specific action list).
§
object_type: AlterDefaultPrivilegesObjectTypeKind of objects the defaults apply to.
Revoke
REVOKE [GRANT OPTION FOR] <privileges> ON <object_type> FROM <grantees> [CASCADE | RESTRICT]
Fields
§
privileges: PrivilegesPrivileges being revoked.
§
object_type: AlterDefaultPrivilegesObjectTypeKind of objects the defaults apply to.
§
cascade: Option<CascadeOption>Optional CASCADE | RESTRICT modifier.
Trait Implementations§
Source§impl Clone for AlterDefaultPrivilegesAction
impl Clone for AlterDefaultPrivilegesAction
Source§fn clone(&self) -> AlterDefaultPrivilegesAction
fn clone(&self) -> AlterDefaultPrivilegesAction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AlterDefaultPrivilegesAction
impl Debug for AlterDefaultPrivilegesAction
Source§impl<'de> Deserialize<'de> for AlterDefaultPrivilegesAction
impl<'de> Deserialize<'de> for AlterDefaultPrivilegesAction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for AlterDefaultPrivilegesAction
impl Hash for AlterDefaultPrivilegesAction
Source§impl Ord for AlterDefaultPrivilegesAction
impl Ord for AlterDefaultPrivilegesAction
Source§fn cmp(&self, other: &AlterDefaultPrivilegesAction) -> Ordering
fn cmp(&self, other: &AlterDefaultPrivilegesAction) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for AlterDefaultPrivilegesAction
impl PartialEq for AlterDefaultPrivilegesAction
Source§fn eq(&self, other: &AlterDefaultPrivilegesAction) -> bool
fn eq(&self, other: &AlterDefaultPrivilegesAction) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for AlterDefaultPrivilegesAction
impl PartialOrd for AlterDefaultPrivilegesAction
Source§impl Visit for AlterDefaultPrivilegesAction
impl Visit for AlterDefaultPrivilegesAction
Source§impl VisitMut for AlterDefaultPrivilegesAction
impl VisitMut for AlterDefaultPrivilegesAction
Source§fn visit<V: VisitorMut>(&mut self, visitor: &mut V) -> ControlFlow<V::Break>
fn visit<V: VisitorMut>(&mut self, visitor: &mut V) -> ControlFlow<V::Break>
Mutably visit this node with the provided
VisitorMut. Read moreimpl Eq for AlterDefaultPrivilegesAction
impl StructuralPartialEq for AlterDefaultPrivilegesAction
Auto Trait Implementations§
impl Freeze for AlterDefaultPrivilegesAction
impl RefUnwindSafe for AlterDefaultPrivilegesAction
impl Send for AlterDefaultPrivilegesAction
impl Sync for AlterDefaultPrivilegesAction
impl Unpin for AlterDefaultPrivilegesAction
impl UnsafeUnpin for AlterDefaultPrivilegesAction
impl UnwindSafe for AlterDefaultPrivilegesAction
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