Struct rincon_client::user::types::NewUser
[−]
[src]
pub struct NewUser<E> where
E: UserExtra, { /* fields omitted */ }
This struct specifies the properties for a new user that is going to be created.
The type parameter E
defines the type of the extra data about the user.
If users are created without any extra data one can use the provided
Empty
type.
Methods
impl<E> NewUser<E> where
E: UserExtra,
[src]
E: UserExtra,
pub fn new<N, P, A, O>(name: N, password: P, active: A, extra: O) -> Self where
N: Into<String>,
P: Into<Option<String>>,
A: Into<Option<bool>>,
O: Into<Option<E>>,
[src]
N: Into<String>,
P: Into<Option<String>>,
A: Into<Option<bool>>,
O: Into<Option<E>>,
Constructs an new instance of NewUser
with all attributes explicitly
set.
pub fn with_name<N, P>(name: N, password: P) -> Self where
N: Into<String>,
P: Into<String>,
[src]
N: Into<String>,
P: Into<String>,
Constructs a new instance of NewUser
with given name and password.
The user will be active by default and will not have any extra data assigned.
pub fn with_default_root_password<N>(name: N) -> Self where
N: Into<String>,
[src]
N: Into<String>,
Constructs a new instance of NewUser
with given name and the default
root password configured for the ArangoDB-Server.
The user will be active by default and will not have any extra data assigned.
pub fn set_extra<O>(&mut self, extra: O) where
O: Into<Option<E>>,
[src]
O: Into<Option<E>>,
Sets the extra data for this NewUser
.
pub fn set_active<A>(&mut self, active: A) where
A: Into<Option<bool>>,
[src]
A: Into<Option<bool>>,
Sets the active flag for this NewUser
.
pub fn name(&self) -> &str
[src]
Returns the name of the user to be created.
pub fn password(&self) -> Option<&String>
[src]
Returns the password of the user to be created.
pub fn is_active(&self) -> Option<bool>
[src]
Returns whether the user will be created as active or inactive.
pub fn extra(&self) -> Option<&E>
[src]
Returns the extra data that will be stored with the user to be created.
Trait Implementations
impl<E: Debug> Debug for NewUser<E> where
E: UserExtra,
[src]
E: UserExtra,
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<E: Clone> Clone for NewUser<E> where
E: UserExtra,
[src]
E: UserExtra,
fn clone(&self) -> NewUser<E>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<E: PartialEq> PartialEq for NewUser<E> where
E: UserExtra,
[src]
E: UserExtra,