pub struct LocalStorage { /* private fields */ }Implementations§
Source§impl LocalStorage
impl LocalStorage
pub async fn new(credentials: Credentials) -> SecureStringResult<Self>
pub fn get_username(&self) -> SecureStringResult<String>
pub async fn user_exists(environment: &str, username: &str) -> bool
pub async fn soft_reset(&self) -> SecureStringResult<()>
pub async fn hard_reset(&self) -> SecureStringResult<()>
pub async fn validate_password(&self) -> SecureStringResult<bool>
pub async fn change_password( &mut self, new_password: &str, ) -> SecureStringResult<()>
pub async fn initiate_with_password( environment: Option<&str>, username: &str, password: &str, ) -> SecureStringResult<Self>
pub async fn initiate_with_no_password( environment: Option<&str>, username: &str, ) -> SecureStringResult<Self>
pub async fn list_items(&self) -> SecureStringResult<Vec<ItemMetaData>>
pub async fn add_item( &mut self, item_meta: ItemMetaData, ) -> SecureStringResult<()>
pub async fn delete_item(&mut self, item_id: &str) -> SecureStringResult<()>
pub async fn save_content( &mut self, item_meta: ItemMetaData, content: &[u8], ) -> SecureStringResult<()>
pub async fn load_content( &self, item_id: &str, ) -> Result<Option<Vec<u8>>, SecureStringError>
Trait Implementations§
Source§impl Clone for LocalStorage
impl Clone for LocalStorage
Source§fn clone(&self) -> LocalStorage
fn clone(&self) -> LocalStorage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LocalStorage
impl Debug for LocalStorage
Source§impl PartialEq for LocalStorage
impl PartialEq for LocalStorage
impl StructuralPartialEq for LocalStorage
Auto Trait Implementations§
impl Freeze for LocalStorage
impl RefUnwindSafe for LocalStorage
impl !Send for LocalStorage
impl !Sync for LocalStorage
impl Unpin for LocalStorage
impl UnwindSafe for LocalStorage
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