Struct database::user::InsertableUser
source · [−]pub struct InsertableUser {
pub username: String,
pub password: String,
pub roles: Roles,
pub prefs: UserSettings,
pub claimed_invite: String,
}
Fields
username: String
password: String
roles: Roles
prefs: UserSettings
claimed_invite: String
Implementations
sourceimpl InsertableUser
impl InsertableUser
sourcepub async fn insert(
self,
conn: &mut Transaction<'_>
) -> Result<User, DatabaseError>
pub async fn insert(
self,
conn: &mut Transaction<'_>
) -> Result<User, DatabaseError>
Method consumes a InsertableUser object and inserts the values under it into database table as a new user
Trait Implementations
sourceimpl<'de> Deserialize<'de> for InsertableUser
impl<'de> Deserialize<'de> for InsertableUser
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for InsertableUser
impl Send for InsertableUser
impl Sync for InsertableUser
impl Unpin for InsertableUser
impl UnwindSafe for InsertableUser
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