pub struct Store { /* private fields */ }Expand description
Store.
Implementations§
Source§impl Store
impl Store
Sourcepub async fn new_memory() -> Result<Self, Error>
pub async fn new_memory() -> Result<Self, Error>
New in memory.
Sourcepub async fn new(path: &str) -> Result<Self, Error>
pub async fn new(path: &str) -> Result<Self, Error>
Create a new Store instance.
This will create a new database at the given path if it doesn’t exist.
Note that path can be a filename, e.g. foo.db or a standard URL,
e.g. sqlite://foo.db.
Source§impl Store
impl Store
Sourcepub async fn write_tx_graph(
&self,
tx_graph: &ChangeSet<ConfirmationBlockTime>,
) -> Result<(), Error>
pub async fn write_tx_graph( &self, tx_graph: &ChangeSet<ConfirmationBlockTime>, ) -> Result<(), Error>
Write tx_graph.
Sourcepub async fn write_local_chain(
&self,
local_chain: &ChangeSet,
) -> Result<(), Error>
pub async fn write_local_chain( &self, local_chain: &ChangeSet, ) -> Result<(), Error>
Write local_chain.
Sourcepub async fn write_keychain_txout(
&self,
keychain_txout: &ChangeSet,
) -> Result<(), Error>
pub async fn write_keychain_txout( &self, keychain_txout: &ChangeSet, ) -> Result<(), Error>
Write keychain_txout.
Sourcepub async fn read_tx_graph(
&self,
) -> Result<ChangeSet<ConfirmationBlockTime>, Error>
pub async fn read_tx_graph( &self, ) -> Result<ChangeSet<ConfirmationBlockTime>, Error>
Read tx_graph.
Sourcepub async fn read_local_chain(&self) -> Result<ChangeSet, Error>
pub async fn read_local_chain(&self) -> Result<ChangeSet, Error>
Read local_chain.
Sourcepub async fn read_keychain_txout(&self) -> Result<ChangeSet, Error>
pub async fn read_keychain_txout(&self) -> Result<ChangeSet, Error>
Read keychain_txout.
Source§impl Store
impl Store
Sourcepub async fn write_changeset(&self, changeset: &ChangeSet) -> Result<(), Error>
pub async fn write_changeset(&self, changeset: &ChangeSet) -> Result<(), Error>
Write changeset.
Sourcepub async fn write_keychain_descriptors(
&self,
descriptors: BTreeMap<KeychainKind, Descriptor<DescriptorPublicKey>>,
) -> Result<(), Error>
pub async fn write_keychain_descriptors( &self, descriptors: BTreeMap<KeychainKind, Descriptor<DescriptorPublicKey>>, ) -> Result<(), Error>
Write keychain descriptors.
Sourcepub async fn read_changeset(&self) -> Result<ChangeSet, Error>
pub async fn read_changeset(&self) -> Result<ChangeSet, Error>
Read changeset.
Sourcepub async fn read_keychain_descriptors(
&self,
) -> Result<BTreeMap<KeychainKind, Descriptor<DescriptorPublicKey>>, Error>
pub async fn read_keychain_descriptors( &self, ) -> Result<BTreeMap<KeychainKind, Descriptor<DescriptorPublicKey>>, Error>
Read keychain descriptors.
Trait Implementations§
Source§impl AsyncWalletPersister for Store
impl AsyncWalletPersister for Store
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more