pub struct Persister { /* private fields */ }
Implementations§
Source§impl Persister
impl Persister
pub fn delete_cached_item_inner(tx: &Transaction<'_>, key: &str) -> Result<()>
pub fn get_cached_item(&self, key: &str) -> Result<Option<String>>
pub fn update_cached_item(&self, key: &str, value: String) -> Result<()>
pub fn delete_cached_item(&self, key: &str) -> Result<()>
pub fn set_wallet_info(&self, info: &WalletInfo) -> Result<()>
pub fn set_blockchain_info(&self, info: &BlockchainInfo) -> Result<()>
pub fn get_info(&self) -> Result<Option<GetInfoResponse>>
pub fn set_swapper_proxy_url(&self, swapper_proxy_url: String) -> Result<()>
pub fn remove_swapper_proxy_url(&self) -> Result<()>
pub fn get_swapper_proxy_url(&self) -> Result<Option<String>>
pub fn set_is_first_sync_complete(&self, complete: bool) -> Result<()>
pub fn get_is_first_sync_complete(&self) -> Result<Option<bool>>
pub fn set_webhook_url(&self, webhook_url: String) -> Result<()>
pub fn remove_webhook_url(&self) -> Result<()>
pub fn get_webhook_url(&self) -> Result<Option<String>>
pub fn set_last_derivation_index_inner( &self, tx: &Transaction<'_>, index: u32, ) -> Result<()>
pub fn set_last_derivation_index(&self, index: u32) -> Result<()>
pub fn get_last_derivation_index(&self) -> Result<Option<u32>>
pub fn next_derivation_index(&self) -> Result<Option<u32>>
pub fn set_last_scanned_derivation_index(&self, index: u32) -> Result<()>
pub fn get_last_scanned_derivation_index(&self) -> Result<Option<u32>>
Source§impl Persister
impl Persister
Sourcepub fn new_using_fs(
working_dir: &str,
network: LiquidNetwork,
sync_enabled: bool,
asset_metadata: Option<Vec<AssetMetadata>>,
) -> Result<Self>
pub fn new_using_fs( working_dir: &str, network: LiquidNetwork, sync_enabled: bool, asset_metadata: Option<Vec<AssetMetadata>>, ) -> Result<Self>
Creates a new Persister that stores data on the provided working_dir
.
pub fn init(&self) -> Result<()>
pub fn get_payment(&self, id: &str) -> Result<Option<Payment>>
pub fn get_payment_by_request( &self, req: &GetPaymentRequest, ) -> Result<Option<Payment>>
pub fn get_payments(&self, req: &ListPaymentsRequest) -> Result<Vec<Payment>>
pub fn get_payments_by_tx_id( &self, req: &ListPaymentsRequest, ) -> Result<HashMap<String, Payment>>
Auto Trait Implementations§
impl Freeze for Persister
impl Send for Persister
impl Sync for Persister
impl RefUnwindSafe for Persister
impl Unpin for Persister
impl UnwindSafe for Persister
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request