pub struct Grant {
pub privileges: Vec<Privilege>,
pub object: GrantObject,
pub grantee: String,
pub with_grant_option: bool,
}Expand description
A grant definition.
Fields§
§privileges: Vec<Privilege>Privileges to grant.
object: GrantObjectObject type and name.
grantee: StringGrantee (role or user).
with_grant_option: boolWhether to include GRANT OPTION.
Implementations§
Source§impl Grant
impl Grant
Sourcepub fn new(grantee: impl Into<String>) -> GrantBuilder
pub fn new(grantee: impl Into<String>) -> GrantBuilder
Create a new grant.
Sourcepub fn to_postgres_sql(&self) -> String
pub fn to_postgres_sql(&self) -> String
Generate PostgreSQL GRANT SQL.
Sourcepub fn to_mysql_sql(&self) -> String
pub fn to_mysql_sql(&self) -> String
Generate MySQL GRANT SQL.
Sourcepub fn to_mssql_sql(&self) -> String
pub fn to_mssql_sql(&self) -> String
Generate MSSQL GRANT SQL.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Grant
impl<'de> Deserialize<'de> for Grant
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
impl Eq for Grant
impl StructuralPartialEq for Grant
Auto Trait Implementations§
impl Freeze for Grant
impl RefUnwindSafe for Grant
impl Send for Grant
impl Sync for Grant
impl Unpin for Grant
impl UnwindSafe for Grant
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