pub struct Persister { /* private fields */ }Expand description
Wallet backend implementations.
Implementations§
Source§impl Persister
impl Persister
Sourcepub fn new_sqlite(path: String) -> Result<Self, PersistenceError>
pub fn new_sqlite(path: String) -> Result<Self, PersistenceError>
Create a new Sqlite connection at the specified file path.
Sourcepub fn new_in_memory() -> Result<Self, PersistenceError>
pub fn new_in_memory() -> Result<Self, PersistenceError>
Create a new connection in memory.
Sourcepub fn custom(persistence: Arc<dyn Persistence>) -> Self
pub fn custom(persistence: Arc<dyn Persistence>) -> Self
Use a native persistence layer.
Trait Implementations§
Source§impl<UT> LowerError<UT> for Persister
impl<UT> LowerError<UT> for Persister
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 Persister
impl<UT> LowerReturn<UT> for Persister
Source§type ReturnType = <Arc<Persister> as LowerReturn<UniFfiTag>>::ReturnType
type ReturnType = <Arc<Persister> 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
Auto Trait Implementations§
impl !Freeze for Persister
impl RefUnwindSafe for Persister
impl Send for Persister
impl Sync for Persister
impl Unpin for Persister
impl UnwindSafe for Persister
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