pub struct CreateUserBuilder<'a> { /* private fields */ }
Expand description
Builder for CreateUser
.
Implementations§
Source§impl<'a> CreateUserBuilder<'a>
impl<'a> CreateUserBuilder<'a>
Sourcepub fn login<VALUE: Into<Cow<'a, str>>>(&mut self, value: VALUE) -> &mut Self
pub fn login<VALUE: Into<Cow<'a, str>>>(&mut self, value: VALUE) -> &mut Self
The login for the user
Sourcepub fn password<VALUE: Into<Cow<'a, str>>>(&mut self, value: VALUE) -> &mut Self
pub fn password<VALUE: Into<Cow<'a, str>>>(&mut self, value: VALUE) -> &mut Self
The user’s password
It is recommended to use generate_password instead
Sourcepub fn firstname<VALUE: Into<Cow<'a, str>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn firstname<VALUE: Into<Cow<'a, str>>>( &mut self, value: VALUE, ) -> &mut Self
The user’s firstname
Sourcepub fn lastname<VALUE: Into<Cow<'a, str>>>(&mut self, value: VALUE) -> &mut Self
pub fn lastname<VALUE: Into<Cow<'a, str>>>(&mut self, value: VALUE) -> &mut Self
The user’s lastname
Sourcepub fn mail<VALUE: Into<Cow<'a, str>>>(&mut self, value: VALUE) -> &mut Self
pub fn mail<VALUE: Into<Cow<'a, str>>>(&mut self, value: VALUE) -> &mut Self
The users primary email address
Sourcepub fn auth_source_id(&mut self, value: u64) -> &mut Self
pub fn auth_source_id(&mut self, value: u64) -> &mut Self
allows setting users to be e.g. LDAP users
Sourcepub fn mail_notification(&mut self, value: MailNotificationOptions) -> &mut Self
pub fn mail_notification(&mut self, value: MailNotificationOptions) -> &mut Self
what kind of mail notifications should be sent to the user
Sourcepub fn must_change_passwd(&mut self, value: bool) -> &mut Self
pub fn must_change_passwd(&mut self, value: bool) -> &mut Self
if set the user must change their password after the next login
Sourcepub fn generate_password(&mut self, value: bool) -> &mut Self
pub fn generate_password(&mut self, value: bool) -> &mut Self
generate a random password
Sourcepub fn send_information(&mut self, value: bool) -> &mut Self
pub fn send_information(&mut self, value: bool) -> &mut Self
Send account information to the user
Sourcepub fn build(&self) -> Result<CreateUser<'a>, CreateUserBuilderError>
pub fn build(&self) -> Result<CreateUser<'a>, CreateUserBuilderError>
Trait Implementations§
Source§impl<'a> Clone for CreateUserBuilder<'a>
impl<'a> Clone for CreateUserBuilder<'a>
Source§fn clone(&self) -> CreateUserBuilder<'a>
fn clone(&self) -> CreateUserBuilder<'a>
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 moreAuto Trait Implementations§
impl<'a> Freeze for CreateUserBuilder<'a>
impl<'a> RefUnwindSafe for CreateUserBuilder<'a>
impl<'a> Send for CreateUserBuilder<'a>
impl<'a> Sync for CreateUserBuilder<'a>
impl<'a> Unpin for CreateUserBuilder<'a>
impl<'a> UnwindSafe for CreateUserBuilder<'a>
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