pub struct PrivilegeDef {
pub grantor: &'static str,
pub grantee: &'static str,
pub schema: &'static str,
pub table: &'static str,
pub privilege_type: PrivilegeType,
pub is_grantable: bool,
}Expand description
Const-friendly privilege definition for compile-time schema definitions.
Fields§
§grantor: &'static strRole granting the privilege
grantee: &'static strRole receiving the privilege
schema: &'static strSchema name
table: &'static strTable name
privilege_type: PrivilegeTypePrivilege type
is_grantable: boolCan the grantee grant this privilege to others?
Implementations§
Source§impl PrivilegeDef
impl PrivilegeDef
Sourcepub const fn new(
schema: &'static str,
table: &'static str,
grantee: &'static str,
privilege_type: PrivilegeType,
) -> Self
pub const fn new( schema: &'static str, table: &'static str, grantee: &'static str, privilege_type: PrivilegeType, ) -> Self
Create a new privilege definition
Sourcepub const fn into_privilege(self) -> Privilege
pub const fn into_privilege(self) -> Privilege
Convert to runtime Privilege type
Trait Implementations§
Source§impl Clone for PrivilegeDef
impl Clone for PrivilegeDef
Source§fn clone(&self) -> PrivilegeDef
fn clone(&self) -> PrivilegeDef
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 PrivilegeDef
impl Debug for PrivilegeDef
Source§impl Default for PrivilegeDef
impl Default for PrivilegeDef
Source§impl From<PrivilegeDef> for Privilege
impl From<PrivilegeDef> for Privilege
Source§fn from(def: PrivilegeDef) -> Self
fn from(def: PrivilegeDef) -> Self
Converts to this type from the input type.
Source§impl Hash for PrivilegeDef
impl Hash for PrivilegeDef
Source§impl PartialEq for PrivilegeDef
impl PartialEq for PrivilegeDef
impl Copy for PrivilegeDef
impl Eq for PrivilegeDef
impl StructuralPartialEq for PrivilegeDef
Auto Trait Implementations§
impl Freeze for PrivilegeDef
impl RefUnwindSafe for PrivilegeDef
impl Send for PrivilegeDef
impl Sync for PrivilegeDef
impl Unpin for PrivilegeDef
impl UnwindSafe for PrivilegeDef
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