pub struct CreateRole {Show 18 fields
pub names: Vec<ObjectName>,
pub if_not_exists: bool,
pub login: Option<bool>,
pub inherit: Option<bool>,
pub bypassrls: Option<bool>,
pub password: Option<Password>,
pub superuser: Option<bool>,
pub create_db: Option<bool>,
pub create_role: Option<bool>,
pub replication: Option<bool>,
pub connection_limit: Option<Expr>,
pub valid_until: Option<Expr>,
pub in_role: Vec<Ident>,
pub in_group: Vec<Ident>,
pub role: Vec<Ident>,
pub user: Vec<Ident>,
pub admin: Vec<Ident>,
pub authorization_owner: Option<ObjectName>,
}Expand description
CREATE ROLE statement See PostgreSQL
Fields§
§names: Vec<ObjectName>Role names to create.
if_not_exists: boolWhether IF NOT EXISTS was specified.
login: Option<bool>Whether LOGIN was specified.
inherit: Option<bool>Whether INHERIT was specified.
bypassrls: Option<bool>Whether BYPASSRLS was specified.
password: Option<Password>Optional password for the role.
superuser: Option<bool>Whether SUPERUSER was specified.
create_db: Option<bool>Whether CREATEDB was specified.
create_role: Option<bool>Whether CREATEROLE was specified.
replication: Option<bool>Whether REPLICATION privilege was specified.
connection_limit: Option<Expr>Optional connection limit expression.
valid_until: Option<Expr>Optional account validity expression.
in_role: Vec<Ident>Members of IN ROLE clause.
in_group: Vec<Ident>Members of IN GROUP clause.
role: Vec<Ident>Roles listed in ROLE clause.
user: Vec<Ident>Users listed in USER clause.
admin: Vec<Ident>Admin users listed in ADMIN clause.
Optional authorization owner.
Trait Implementations§
Source§impl Clone for CreateRole
impl Clone for CreateRole
Source§fn clone(&self) -> CreateRole
fn clone(&self) -> CreateRole
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 CreateRole
impl Debug for CreateRole
Source§impl<'de> Deserialize<'de> for CreateRole
impl<'de> Deserialize<'de> for CreateRole
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
Source§impl Display for CreateRole
impl Display for CreateRole
Source§impl From<CreateRole> for Statement
impl From<CreateRole> for Statement
Source§fn from(cr: CreateRole) -> Self
fn from(cr: CreateRole) -> Self
Converts to this type from the input type.
Source§impl Hash for CreateRole
impl Hash for CreateRole
Source§impl Ord for CreateRole
impl Ord for CreateRole
Source§fn cmp(&self, other: &CreateRole) -> Ordering
fn cmp(&self, other: &CreateRole) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CreateRole
impl PartialEq for CreateRole
Source§impl PartialOrd for CreateRole
impl PartialOrd for CreateRole
Source§impl Serialize for CreateRole
impl Serialize for CreateRole
Source§impl Spanned for CreateRole
impl Spanned for CreateRole
Source§impl Visit for CreateRole
impl Visit for CreateRole
Source§impl VisitMut for CreateRole
impl VisitMut for CreateRole
Source§fn visit<V: VisitorMut>(&mut self, visitor: &mut V) -> ControlFlow<V::Break>
fn visit<V: VisitorMut>(&mut self, visitor: &mut V) -> ControlFlow<V::Break>
Mutably visit this node with the provided
VisitorMut. Read moreimpl Eq for CreateRole
impl StructuralPartialEq for CreateRole
Auto Trait Implementations§
impl Freeze for CreateRole
impl RefUnwindSafe for CreateRole
impl Send for CreateRole
impl Sync for CreateRole
impl Unpin for CreateRole
impl UnwindSafe for CreateRole
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