Struct postgresql_commands::createuser::CreateUserBuilder
source · pub struct CreateUserBuilder { /* private fields */ }
Expand description
createuser
creates a new PostgreSQL
role.
Implementations§
source§impl CreateUserBuilder
impl CreateUserBuilder
sourcepub fn new() -> Self
pub fn new() -> Self
Create a new CreateUserBuilder
sourcepub fn from(settings: &dyn Settings) -> Self
pub fn from(settings: &dyn Settings) -> Self
Create a new CreateUserBuilder
from Settings
sourcepub fn program_dir<P: Into<PathBuf>>(self, path: P) -> Self
pub fn program_dir<P: Into<PathBuf>>(self, path: P) -> Self
Location of the program binary
sourcepub fn with_admin<S: AsRef<OsStr>>(self, role: S) -> Self
pub fn with_admin<S: AsRef<OsStr>>(self, role: S) -> Self
ROLE will be a member of new role with admin option
sourcepub fn connection_limit(self, limit: u32) -> Self
pub fn connection_limit(self, limit: u32) -> Self
Connection limit for role (default: no limit)
sourcepub fn no_createdb(self) -> Self
pub fn no_createdb(self) -> Self
Role cannot create databases (default)
sourcepub fn no_inherit(self) -> Self
pub fn no_inherit(self) -> Self
Role does not inherit privileges
sourcepub fn with_member<S: AsRef<OsStr>>(self, role: S) -> Self
pub fn with_member<S: AsRef<OsStr>>(self, role: S) -> Self
ROLE will be a member of new role
sourcepub fn createrole(self) -> Self
pub fn createrole(self) -> Self
Role can create new roles
sourcepub fn no_createrole(self) -> Self
pub fn no_createrole(self) -> Self
Role cannot create roles (default)
sourcepub fn no_superuser(self) -> Self
pub fn no_superuser(self) -> Self
Role will not be superuser (default)
sourcepub fn valid_until<S: AsRef<OsStr>>(self, timestamp: S) -> Self
pub fn valid_until<S: AsRef<OsStr>>(self, timestamp: S) -> Self
Password expiration date and time for role
sourcepub fn interactive(self) -> Self
pub fn interactive(self) -> Self
Prompt for missing role name and attributes rather than using defaults
sourcepub fn no_bypassrls(self) -> Self
pub fn no_bypassrls(self) -> Self
Role cannot bypass row-level security (RLS) policy (default)
sourcepub fn replication(self) -> Self
pub fn replication(self) -> Self
Role can initiate replication
sourcepub fn no_replication(self) -> Self
pub fn no_replication(self) -> Self
Role cannot initiate replication (default)
sourcepub fn username<S: AsRef<OsStr>>(self, username: S) -> Self
pub fn username<S: AsRef<OsStr>>(self, username: S) -> Self
User name to connect as (not the one to create)
sourcepub fn no_password(self) -> Self
pub fn no_password(self) -> Self
Never prompt for password
sourcepub fn pg_password<S: AsRef<OsStr>>(self, pg_password: S) -> Self
pub fn pg_password<S: AsRef<OsStr>>(self, pg_password: S) -> Self
user password
Trait Implementations§
source§impl Clone for CreateUserBuilder
impl Clone for CreateUserBuilder
source§fn clone(&self) -> CreateUserBuilder
fn clone(&self) -> CreateUserBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl CommandBuilder for CreateUserBuilder
impl CommandBuilder for CreateUserBuilder
source§fn get_program(&self) -> &'static OsStr
fn get_program(&self) -> &'static OsStr
Get the program name
source§fn get_program_dir(&self) -> &Option<PathBuf>
fn get_program_dir(&self) -> &Option<PathBuf>
Location of the program binary
source§fn env<S: AsRef<OsStr>>(self, key: S, value: S) -> Self
fn env<S: AsRef<OsStr>>(self, key: S, value: S) -> Self
Set an environment variable for the command
source§fn get_program_file(&self) -> PathBuf
fn get_program_file(&self) -> PathBuf
source§impl Debug for CreateUserBuilder
impl Debug for CreateUserBuilder
source§impl Default for CreateUserBuilder
impl Default for CreateUserBuilder
source§fn default() -> CreateUserBuilder
fn default() -> CreateUserBuilder
Auto Trait Implementations§
impl Freeze for CreateUserBuilder
impl RefUnwindSafe for CreateUserBuilder
impl Send for CreateUserBuilder
impl Sync for CreateUserBuilder
impl Unpin for CreateUserBuilder
impl UnwindSafe for CreateUserBuilder
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,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)