pub struct DatabasePrivilegeEditEntry {
pub database: Option<MySQLDatabase>,
pub user: MySQLUser,
pub type_: DatabasePrivilegeEditEntryType,
pub privileges: Vec<String>,
}Expand description
This struct represents a single CLI argument for editing database privileges.
This is typically parsed from a string looking like:
[database_name:]username:[+|-]privileges
Fields§
§database: Option<MySQLDatabase>§user: MySQLUser§type_: DatabasePrivilegeEditEntryType§privileges: Vec<String>Implementations§
Source§impl DatabasePrivilegeEditEntry
impl DatabasePrivilegeEditEntry
Sourcepub fn parse_from_str(arg: &str) -> Result<DatabasePrivilegeEditEntry>
pub fn parse_from_str(arg: &str) -> Result<DatabasePrivilegeEditEntry>
Parses a privilege edit entry from a string.
The expected format is:
[database_name:]username:[+|-]privileges
where:
- database_name is optional, if omitted the entry applies to all databases
- username is the name of the user to edit privileges for
- privileges is a string of characters representing the privileges to add, set or remove
- the
+or-prefix indicates whether to add or remove the privileges, if omitted the privileges are set directly - privileges characters are: siudcDaAItlrA
pub fn as_database_privileges_diff( &self, external_database_name: Option<&MySQLDatabase>, ) -> Result<DatabasePrivilegeRowDiff>
Trait Implementations§
Source§impl Clone for DatabasePrivilegeEditEntry
impl Clone for DatabasePrivilegeEditEntry
Source§fn clone(&self) -> DatabasePrivilegeEditEntry
fn clone(&self) -> DatabasePrivilegeEditEntry
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 DatabasePrivilegeEditEntry
impl Debug for DatabasePrivilegeEditEntry
Source§impl Display for DatabasePrivilegeEditEntry
impl Display for DatabasePrivilegeEditEntry
impl Eq for DatabasePrivilegeEditEntry
impl StructuralPartialEq for DatabasePrivilegeEditEntry
Auto Trait Implementations§
impl Freeze for DatabasePrivilegeEditEntry
impl RefUnwindSafe for DatabasePrivilegeEditEntry
impl Send for DatabasePrivilegeEditEntry
impl Sync for DatabasePrivilegeEditEntry
impl Unpin for DatabasePrivilegeEditEntry
impl UnwindSafe for DatabasePrivilegeEditEntry
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§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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more