Struct rincon_client::database::methods::CreateDatabase
[−]
[src]
pub struct CreateDatabase<E> where
E: UserExtra, { /* fields omitted */ }
Creates a new database.
Note: creating a new database is only possible from within the _system
database.
Methods
impl<E> CreateDatabase<E> where
E: UserExtra,
[src]
E: UserExtra,
pub fn new(database: NewDatabase<E>) -> Self
[src]
Constructs a new CreateDatabase
method with the parameters specified
in the given NewDatabase
struct.
pub fn with_name<N>(name: N) -> Self where
N: Into<String>,
[src]
N: Into<String>,
Constructs a new CreateDatabase
method with the given name used as
the name of the database that is going to be created.
All other parameters are left to their defaults.
pub fn with_name_for_users<N>(name: N, users: Vec<NewUser<E>>) -> Self where
N: Into<String>,
[src]
N: Into<String>,
Constructs a new CreateDatabase
method with the given name used as
the name of the database that is going to be created and assigns it to
the given users.
All other parameters are left to their defaults.
pub fn database(&self) -> &NewDatabase<E>
[src]
Returns the NewDatabase
parameters of this CreateDatabase
method.
Trait Implementations
impl<E: Debug> Debug for CreateDatabase<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 CreateDatabase<E> where
E: UserExtra,
[src]
E: UserExtra,
fn clone(&self) -> CreateDatabase<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 CreateDatabase<E> where
E: UserExtra,
[src]
E: UserExtra,
fn eq(&self, __arg_0: &CreateDatabase<E>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &CreateDatabase<E>) -> bool
[src]
This method tests for !=
.
impl<E> Method for CreateDatabase<E> where
E: UserExtra,
[src]
E: UserExtra,
type Result = bool
The type of the result of a method call.
const RETURN_TYPE: RpcReturnType
RETURN_TYPE: RpcReturnType = RpcReturnType{result_field: Some(FIELD_RESULT), code_field: Some(FIELD_CODE),}
Specification of the fields of RPC-like return type. Read more
fn return_type(&self) -> RpcReturnType
[src]
Returns the specification of the RPC-like return type.
impl<E> Prepare for CreateDatabase<E> where
E: UserExtra + Serialize,
[src]
E: UserExtra + Serialize,
type Content = NewDatabase<E>
The type of the content of a method call. Read more
fn operation(&self) -> Operation
[src]
Returns the type of operation this method is executing.
fn path(&self) -> String
[src]
Returns the resource path of a REST operation.
fn parameters(&self) -> Parameters
[src]
Returns the query parameters of this method. Read more
fn header(&self) -> Parameters
[src]
Returns the header parameters of this method. Read more
fn content(&self) -> Option<&Self::Content>
[src]
Returns the content of this method if any. Read more
Auto Trait Implementations
impl<E> Send for CreateDatabase<E> where
E: Send,
E: Send,
impl<E> Sync for CreateDatabase<E> where
E: Sync,
E: Sync,