pub struct LoginStore {
pub db: Mutex<Option<LoginDb>>,
}Fields§
§db: Mutex<Option<LoginDb>>Implementations§
Source§impl LoginStore
impl LoginStore
pub fn new( path: impl AsRef<Path>, encdec: Arc<dyn EncryptorDecryptor>, ) -> ApiResult<Self>
pub fn new_from_db(db: LoginDb) -> Self
pub fn lock_db(&self) -> Result<MappedMutexGuard<'_, LoginDb>>
pub fn is_empty(&self) -> ApiResult<bool>
pub fn list(&self) -> ApiResult<Vec<Login>>
pub fn count(&self) -> ApiResult<i64>
pub fn count_by_origin(&self, origin: &str) -> ApiResult<i64>
pub fn count_by_form_action_origin( &self, form_action_origin: &str, ) -> ApiResult<i64>
pub fn get(&self, id: &str) -> ApiResult<Option<Login>>
pub fn get_by_base_domain(&self, base_domain: &str) -> ApiResult<Vec<Login>>
pub fn has_logins_by_base_domain(&self, base_domain: &str) -> ApiResult<bool>
pub fn find_login_to_update( &self, entry: LoginEntry, ) -> ApiResult<Option<Login>>
pub fn touch(&self, id: &str) -> ApiResult<()>
pub fn delete(&self, id: &str) -> ApiResult<bool>
pub fn delete_many(&self, ids: Vec<String>) -> ApiResult<Vec<bool>>
pub fn delete_undecryptable_records_for_remote_replacement( self: Arc<Self>, ) -> ApiResult<LoginsDeletionMetrics>
pub fn wipe_local(&self) -> ApiResult<()>
pub fn reset(self: Arc<Self>) -> ApiResult<()>
pub fn update(&self, id: &str, entry: LoginEntry) -> ApiResult<Login>
pub fn add(&self, entry: LoginEntry) -> ApiResult<Login>
pub fn add_many( &self, entries: Vec<LoginEntry>, ) -> ApiResult<Vec<BulkResultEntry>>
Sourcepub fn add_with_meta(
&self,
entry_with_meta: LoginEntryWithMeta,
) -> ApiResult<Login>
pub fn add_with_meta( &self, entry_with_meta: LoginEntryWithMeta, ) -> ApiResult<Login>
This method is intended to preserve metadata (LoginMeta) during a migration.
In normal operation, this method should not be used; instead,
use add(entry), which manages the corresponding fields itself.
pub fn add_many_with_meta( &self, entries_with_meta: Vec<LoginEntryWithMeta>, ) -> ApiResult<Vec<BulkResultEntry>>
pub fn add_or_update(&self, entry: LoginEntry) -> ApiResult<Login>
pub fn set_checkpoint(&self, checkpoint: &str) -> ApiResult<()>
pub fn get_checkpoint(&self) -> ApiResult<Option<String>>
pub fn run_maintenance(&self) -> ApiResult<()>
pub fn shutdown(&self)
pub fn register_with_sync_manager(self: Arc<Self>)
pub fn create_logins_sync_engine( self: Arc<Self>, ) -> ApiResult<Box<dyn SyncEngine>>
Trait Implementations§
Source§impl<UT> LiftRef<UT> for LoginStore
impl<UT> LiftRef<UT> for LoginStore
type LiftType = Arc<LoginStore>
Source§impl<UT> LowerError<UT> for LoginStore
impl<UT> LowerError<UT> for LoginStore
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Lower this value for scaffolding function return Read more
Source§impl<UT> LowerReturn<UT> for LoginStore
impl<UT> LowerReturn<UT> for LoginStore
Source§type ReturnType = <Arc<LoginStore> as LowerReturn<UniFfiTag>>::ReturnType
type ReturnType = <Arc<LoginStore> as LowerReturn<UniFfiTag>>::ReturnType
The type that should be returned by scaffolding functions for this type. Read more
Source§fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
Lower the return value from an scaffolding call Read more
§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Lower the return value for failed argument lifts Read more
Source§impl<UT> TypeId<UT> for LoginStore
impl<UT> TypeId<UT> for LoginStore
const TYPE_ID_META: MetadataBuffer
Auto Trait Implementations§
impl !Freeze for LoginStore
impl !RefUnwindSafe for LoginStore
impl Send for LoginStore
impl Sync for LoginStore
impl Unpin for LoginStore
impl !UnwindSafe for LoginStore
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
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<> Read more