Struct chamber_core::users::User
source · pub struct User {
pub username: String,
pub password: String,
/* private fields */
}Fields§
§username: String§password: StringImplementations§
source§impl User
impl User
pub fn new(username: String, password: Option<String>) -> Self
pub fn access_level(&self) -> i32
pub fn set_access_level(self, access_level: i32)
pub fn roles(self) -> Vec<String>
pub fn set_user_rules(&mut self, vec: Vec<String>)
pub fn grant_user_role(self, role: String) -> Result<(), DatabaseError>
pub fn revoke_user_role(self, role: String) -> Result<(), DatabaseError>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for User
impl Send for User
impl Sync for User
impl Unpin for User
impl UnwindSafe for User
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more