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§
source§impl 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§
source§impl<'de> Deserialize<'de> for InsertableUser
impl<'de> Deserialize<'de> for InsertableUser
source§fn 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