pub struct Store { /* private fields */ }
Implementations§
Source§impl Store
impl Store
pub fn new(db_path: impl AsRef<Path>) -> ApiResult<Self>
Creates a store backed by an in-memory database that shares its memory API (required for autofill sync tests).
pub fn add_credit_card( &self, fields: UpdatableCreditCardFields, ) -> ApiResult<CreditCard>
pub fn get_credit_card(&self, guid: String) -> ApiResult<CreditCard>
pub fn get_all_credit_cards(&self) -> ApiResult<Vec<CreditCard>>
pub fn update_credit_card( &self, guid: String, credit_card: UpdatableCreditCardFields, ) -> ApiResult<()>
pub fn delete_credit_card(&self, guid: String) -> ApiResult<bool>
pub fn touch_credit_card(&self, guid: String) -> ApiResult<()>
pub fn add_address( &self, new_address: UpdatableAddressFields, ) -> ApiResult<Address>
pub fn get_address(&self, guid: String) -> ApiResult<Address>
pub fn get_all_addresses(&self) -> ApiResult<Vec<Address>>
pub fn update_address( &self, guid: String, address: UpdatableAddressFields, ) -> ApiResult<()>
pub fn delete_address(&self, guid: String) -> ApiResult<bool>
pub fn touch_address(&self, guid: String) -> ApiResult<()>
pub fn scrub_encrypted_data(self: Arc<Self>) -> ApiResult<()>
pub fn register_with_sync_manager(self: Arc<Self>)
pub fn create_credit_cards_sync_engine(self: Arc<Self>) -> Box<dyn SyncEngine>
pub fn create_addresses_sync_engine(self: Arc<Self>) -> Box<dyn SyncEngine>
Trait Implementations§
§impl<UT> LowerError<UT> for Store
impl<UT> LowerError<UT> for Store
§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Lower this value for scaffolding function return Read more
§impl<UT> LowerReturn<UT> for Store
impl<UT> LowerReturn<UT> for Store
§type ReturnType = <Arc<Store> as LowerReturn<UniFfiTag>>::ReturnType
type ReturnType = <Arc<Store> as LowerReturn<UniFfiTag>>::ReturnType
The type that should be returned by scaffolding functions for this type. Read more
§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
§impl<UT> TypeId<UT> for Store
impl<UT> TypeId<UT> for Store
const TYPE_ID_META: MetadataBuffer = _
Auto Trait Implementations§
impl !Freeze for Store
impl RefUnwindSafe for Store
impl Send for Store
impl Sync for Store
impl Unpin for Store
impl UnwindSafe for Store
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