pub struct UserStore { /* private fields */ }Implementations§
Source§impl UserStore
impl UserStore
pub fn new() -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn contains(&self, name: &str) -> bool
Sourcepub fn get(&self, name: &str) -> Option<&UserRecord>
pub fn get(&self, name: &str) -> Option<&UserRecord>
Stable iteration in name order — used by SHOW USERS and the
snapshot writer.
v7.17.0 Phase 3.P0-71: look up a user by name. Returns
None for unknown names; the caller decides whether to
surface “Access Denied” or “User not found” (the
MySQL-wire shim picks the former to avoid leaking user
existence to unauthenticated clients).
pub fn iter(&self) -> impl Iterator<Item = (&str, &UserRecord)>
pub fn create( &mut self, name: &str, password: &str, role: Role, salt: [u8; 16], ) -> Result<(), UserError>
pub fn drop(&mut self, name: &str) -> Result<(), UserError>
Sourcepub fn enable_scram(
&mut self,
name: &str,
password: &str,
salt: [u8; 16],
iters: u32,
) -> Result<(), UserError>
pub fn enable_scram( &mut self, name: &str, password: &str, salt: [u8; 16], iters: u32, ) -> Result<(), UserError>
v4.8: attach SCRAM-SHA-256 verifier to an existing user.
Called by the engine right after create so new users have
both auth paths (legacy BLAKE3 + SCRAM) available. The salt
here is independent of the BLAKE3 hash salt — they serve
different purposes.
pub fn verify(&self, name: &str, password: &str) -> Option<Role>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UserStore
impl RefUnwindSafe for UserStore
impl Send for UserStore
impl Sync for UserStore
impl Unpin for UserStore
impl UnsafeUnpin for UserStore
impl UnwindSafe for UserStore
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