pub struct CreateUserStatement {
pub name: String,
pub password: String,
pub role: String,
pub login: Option<bool>,
pub inherit: Option<bool>,
pub superuser: Option<bool>,
pub is_user: bool,
}Fields§
§name: String§password: StringEmpty when the statement carried no PASSWORD — legal for a bare
CREATE ROLE, which cannot log in anyway.
role: StringOne of admin / readwrite / readonly. Stored verbatim from
the parser; the engine validates against Role::parse so a
typo lands as a runtime error with a clear message rather than
a parse failure.
login: Option<bool>v7.39 (read01 round 58) — the PG role attributes. None = the
statement did not say, so the default for its spelling applies:
CREATE USER is CREATE ROLE … LOGIN, CREATE ROLE is NOLOGIN;
both default to INHERIT and NOSUPERUSER.
inherit: Option<bool>§superuser: Option<bool>§is_user: booltrue when spelled CREATE USER (LOGIN by default).
Trait Implementations§
Source§impl Clone for CreateUserStatement
impl Clone for CreateUserStatement
Source§fn clone(&self) -> CreateUserStatement
fn clone(&self) -> CreateUserStatement
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CreateUserStatement
impl Debug for CreateUserStatement
impl Eq for CreateUserStatement
Source§impl PartialEq for CreateUserStatement
impl PartialEq for CreateUserStatement
impl StructuralPartialEq for CreateUserStatement
Auto Trait Implementations§
impl Freeze for CreateUserStatement
impl RefUnwindSafe for CreateUserStatement
impl Send for CreateUserStatement
impl Sync for CreateUserStatement
impl Unpin for CreateUserStatement
impl UnsafeUnpin for CreateUserStatement
impl UnwindSafe for CreateUserStatement
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