pub struct CreateUser {
pub if_not_exists: bool,
pub users: ThinVec<UserSpec>,
pub default_roles: ThinVec<AccountName>,
pub require: Option<TlsRequirement>,
pub resource_options: ThinVec<ResourceLimit>,
pub password_lock_options: ThinVec<PasswordLockOption>,
pub attribute: Option<UserAttribute>,
pub meta: Meta,
}Expand description
CREATE USER [IF NOT EXISTS] <user> [<auth>] [, …] [DEFAULT ROLE <role> [, …]] [REQUIRE <tls>] [WITH <resource> …] [<password/lock option> …] [COMMENT | ATTRIBUTE '<string>'] — the MySQL account-creation statement.
The <user> [<auth>] elements are a comma list of UserSpecs. The trailing clauses are
each written at most once (MySQL’s grammar has them as single optional tails, not a
repeatable option bag), except the resource-limit and password/lock lists, which are
whitespace-separated repeatable runs.
Fields§
§if_not_exists: boolWhether the IF NOT EXISTS guard was written.
users: ThinVec<UserSpec>The <user> [<auth>] account list, in source order (always non-empty).
default_roles: ThinVec<AccountName>The DEFAULT ROLE <role> [, …] roles, in source order; empty when the clause was not
written (MySQL rejects an empty DEFAULT ROLE, so empty is unambiguously “absent”).
require: Option<TlsRequirement>The REQUIRE … TLS requirement; None when the clause was omitted.
resource_options: ThinVec<ResourceLimit>The WITH <resource> … resource limits, in source order; empty when no WITH was
written.
password_lock_options: ThinVec<PasswordLockOption>The password / account-lock options, in source order; empty when none were written.
attribute: Option<UserAttribute>The COMMENT '…' / ATTRIBUTE '…' account attribute; None when neither was written
(the two are mutually exclusive in the grammar).
meta: MetaSource location and node identity.
Trait Implementations§
Source§impl Clone for CreateUser
impl Clone for CreateUser
Source§fn clone(&self) -> CreateUser
fn clone(&self) -> CreateUser
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CreateUser
impl Debug for CreateUser
Source§impl<'de> Deserialize<'de> for CreateUser
impl<'de> Deserialize<'de> for CreateUser
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>,
impl Eq for CreateUser
Source§impl Hash for CreateUser
impl Hash for CreateUser
Source§impl PartialEq for CreateUser
impl PartialEq for CreateUser
Source§impl Render for CreateUser
impl Render for CreateUser
Source§fn render(&self, ctx: &RenderCtx<'_>, f: &mut Formatter<'_>) -> Result
fn render(&self, ctx: &RenderCtx<'_>, f: &mut Formatter<'_>) -> Result
Source§fn operand_binding_power(&self) -> Option<BindingPower>
fn operand_binding_power(&self) -> Option<BindingPower>
None (the default) for a self-delimiting node — an atom, call, or
constructor — that never needs parentheses. Read moreSource§impl Serialize for CreateUser
impl Serialize for CreateUser
impl StructuralPartialEq for CreateUser
Auto Trait Implementations§
impl Freeze for CreateUser
impl RefUnwindSafe for CreateUser
impl Send for CreateUser
impl Sync for CreateUser
impl Unpin for CreateUser
impl UnsafeUnpin for CreateUser
impl UnwindSafe for CreateUser
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> DynAstExt for T
impl<T> DynAstExt for T
Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&dyn Any for downcasting a node back to its concrete type.Source§fn dyn_clone(&self) -> Box<dyn DynAstExt>
fn dyn_clone(&self) -> Box<dyn DynAstExt>
Clone (whose
Self-returning signature cannot go through a vtable).Source§fn dyn_eq(&self, other: &dyn DynAstExt) -> bool
fn dyn_eq(&self, other: &dyn DynAstExt) -> bool
PartialEq (whose &Self argument cannot go through a vtable). Equal
iff other holds the same concrete type and that type deems the values
equal; differently-typed nodes are never equal.