Struct veilid_core::ProtectedStore
source · pub struct ProtectedStore { /* private fields */ }
Implementations§
source§impl ProtectedStore
impl ProtectedStore
pub fn new(config: VeilidConfig) -> Self
pub async fn delete_all(&self) -> EyreResult<()>
pub async fn init(&self) -> EyreResult<()>
pub async fn terminate(&self)
pub async fn save_user_secret_string<K: AsRef<str> + Debug, V: AsRef<str> + Debug>( &self, key: K, value: V ) -> EyreResult<bool>
pub async fn load_user_secret_string<K: AsRef<str> + Debug>( &self, key: K ) -> EyreResult<Option<String>>
pub async fn save_user_secret_json<K, T>( &self, key: K, value: &T ) -> EyreResult<bool>
pub async fn load_user_secret_json<K, T>(&self, key: K) -> EyreResult<Option<T>>
pub async fn save_user_secret<K: AsRef<str> + Debug>( &self, key: K, value: &[u8] ) -> EyreResult<bool>
pub async fn load_user_secret<K: AsRef<str> + Debug>( &self, key: K ) -> EyreResult<Option<Vec<u8>>>
pub async fn remove_user_secret<K: AsRef<str> + Debug>( &self, key: K ) -> EyreResult<bool>
Trait Implementations§
source§impl Clone for ProtectedStore
impl Clone for ProtectedStore
source§fn clone(&self) -> ProtectedStore
fn clone(&self) -> ProtectedStore
Returns a copy 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 moreAuto Trait Implementations§
impl Freeze for ProtectedStore
impl !RefUnwindSafe for ProtectedStore
impl Send for ProtectedStore
impl Sync for ProtectedStore
impl Unpin for ProtectedStore
impl !UnwindSafe for ProtectedStore
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