Struct minerva_data::user::NewUser
source · [−]pub struct NewUser {
pub login: String,
pub name: String,
pub email: Option<String>,
pub pwhash: Vec<u8>,
}
Expand description
DTO representing a new entry on the user
table.
Fields
login: String
Username of the user being created.
name: String
Full name of the user being created.
email: Option<String>
Optional e-mail of the user being created. Shouldn’t clash with any other e-mail on the table.
pwhash: Vec<u8>
Hash of the password of the user being created.
Trait Implementations
sourceimpl<'insert> Insertable<table> for &'insert NewUser
impl<'insert> Insertable<table> for &'insert NewUser
type Values = <(Option<Eq<login, <&'insert String as AsExpression<<login as Expression>::SqlType>>::Expression>>, Option<Eq<name, <&'insert String as AsExpression<<name as Expression>::SqlType>>::Expression>>, Option<Eq<email, <&'insert String as AsExpression<<email as Expression>::SqlType>>::Expression>>, Option<Eq<pwhash, <&'insert Vec<u8, Global> as AsExpression<<pwhash as Expression>::SqlType>>::Expression>>) as Insertable<table>>::Values
type Values = <(Option<Eq<login, <&'insert String as AsExpression<<login as Expression>::SqlType>>::Expression>>, Option<Eq<name, <&'insert String as AsExpression<<name as Expression>::SqlType>>::Expression>>, Option<Eq<email, <&'insert String as AsExpression<<email as Expression>::SqlType>>::Expression>>, Option<Eq<pwhash, <&'insert Vec<u8, Global> as AsExpression<<pwhash as Expression>::SqlType>>::Expression>>) as Insertable<table>>::Values
The
VALUES
clause to insert these records Read morefn insert_into(
self,
table: T
) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>
fn insert_into(
self,
table: T
) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>
Insert
self
into a given table. Read moresourceimpl<'insert> Insertable<table> for NewUser
impl<'insert> Insertable<table> for NewUser
type Values = <(Option<Eq<login, <String as AsExpression<<login as Expression>::SqlType>>::Expression>>, Option<Eq<name, <String as AsExpression<<name as Expression>::SqlType>>::Expression>>, Option<Eq<email, <String as AsExpression<<email as Expression>::SqlType>>::Expression>>, Option<Eq<pwhash, <Vec<u8, Global> as AsExpression<<pwhash as Expression>::SqlType>>::Expression>>) as Insertable<table>>::Values
type Values = <(Option<Eq<login, <String as AsExpression<<login as Expression>::SqlType>>::Expression>>, Option<Eq<name, <String as AsExpression<<name as Expression>::SqlType>>::Expression>>, Option<Eq<email, <String as AsExpression<<email as Expression>::SqlType>>::Expression>>, Option<Eq<pwhash, <Vec<u8, Global> as AsExpression<<pwhash as Expression>::SqlType>>::Expression>>) as Insertable<table>>::Values
The
VALUES
clause to insert these records Read morefn insert_into(
self,
table: T
) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>
fn insert_into(
self,
table: T
) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>
Insert
self
into a given table. Read moresourceimpl JsonSchema for NewUser
impl JsonSchema for NewUser
sourcefn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
sourcefn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreimpl<'insert> UndecoratedInsertRecord<table> for NewUser
Auto Trait Implementations
impl RefUnwindSafe for NewUser
impl Send for NewUser
impl Sync for NewUser
impl Unpin for NewUser
impl UnwindSafe for NewUser
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> IntoCollection<T> for T
impl<T> IntoCollection<T> for T
fn into_collection<A>(self) -> SmallVec<A>where
A: Array<Item = T>,
fn into_collection<A>(self) -> SmallVec<A>where
A: Array<Item = T>,
Converts
self
into a collection.fn mapped<U, F, A>(self, f: F) -> SmallVec<A>where
F: FnMut(T) -> U,
A: Array<Item = U>,
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request