#[non_exhaustive]pub struct User {
pub name: String,
pub password: String,
pub database_roles: Vec<String>,
pub user_type: UserType,
pub keep_extra_roles: bool,
/* private fields */
}Expand description
Message describing User object.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringOutput only. Name of the resource in the form of projects/{project}/locations/{location}/cluster/{cluster}/users/{user}.
password: StringInput only. Password for the user.
database_roles: Vec<String>Optional. List of database roles this user has. The database role strings are subject to the PostgreSQL naming conventions.
user_type: UserTypeOptional. Type of this user.
keep_extra_roles: boolInput only. If the user already exists and it has additional roles, keep them granted.
Implementations§
Source§impl User
impl User
pub fn new() -> Self
Sourcepub fn set_password<T: Into<String>>(self, v: T) -> Self
pub fn set_password<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_database_roles<T, V>(self, v: T) -> Self
pub fn set_database_roles<T, V>(self, v: T) -> Self
Sets the value of database_roles.
§Example
ⓘ
let x = User::new().set_database_roles(["a", "b", "c"]);Sourcepub fn set_user_type<T: Into<UserType>>(self, v: T) -> Self
pub fn set_user_type<T: Into<UserType>>(self, v: T) -> Self
Sourcepub fn set_keep_extra_roles<T: Into<bool>>(self, v: T) -> Self
pub fn set_keep_extra_roles<T: Into<bool>>(self, v: T) -> Self
Trait Implementations§
impl StructuralPartialEq for User
Auto Trait Implementations§
impl Freeze for User
impl RefUnwindSafe for User
impl Send for User
impl Sync for User
impl Unpin for User
impl UnsafeUnpin for User
impl UnwindSafe for User
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