pub struct LocalUserStore { /* private fields */ }Expand description
Local in-memory user store for offline tactical use.
Implementations§
Source§impl LocalUserStore
impl LocalUserStore
Sourcepub fn with_users(users: Vec<UserRecord>) -> Self
pub fn with_users(users: Vec<UserRecord>) -> Self
Create a local user store with pre-provisioned users.
Trait Implementations§
Source§impl Debug for LocalUserStore
impl Debug for LocalUserStore
Source§impl Default for LocalUserStore
impl Default for LocalUserStore
Source§fn default() -> LocalUserStore
fn default() -> LocalUserStore
Returns the “default value” for a type. Read more
Source§impl UserStore for LocalUserStore
impl UserStore for LocalUserStore
Source§fn store_user(&self, record: UserRecord) -> Result<(), SecurityError>
fn store_user(&self, record: UserRecord) -> Result<(), SecurityError>
Store a user record.
Source§fn update_user(&self, record: UserRecord) -> Result<(), SecurityError>
fn update_user(&self, record: UserRecord) -> Result<(), SecurityError>
Update a user record.
Source§fn delete_user(&self, username: &str) -> Result<(), SecurityError>
fn delete_user(&self, username: &str) -> Result<(), SecurityError>
Delete a user.
Source§fn list_users(&self) -> Vec<String>
fn list_users(&self) -> Vec<String>
List all usernames.
Auto Trait Implementations§
impl !Freeze for LocalUserStore
impl RefUnwindSafe for LocalUserStore
impl Send for LocalUserStore
impl Sync for LocalUserStore
impl Unpin for LocalUserStore
impl UnsafeUnpin for LocalUserStore
impl UnwindSafe for LocalUserStore
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more