pub struct FinalizedState<Db, F> { /* private fields */ }Expand description
Helper to access the finalized state
Implementations§
Source§impl<Db, F> FinalizedState<Db, F>where
Db: DbQueriesPort,
F: FetchVaultsInboundPort,
impl<Db, F> FinalizedState<Db, F>where
Db: DbQueriesPort,
F: FetchVaultsInboundPort,
Sourcepub async fn get_vault(&self, address: &Address) -> Result<Vault, Error>
pub async fn get_vault(&self, address: &Address) -> Result<Vault, Error>
Get the finalized state of the Vault with the given address.
The finalized state is the state as it is on the base layer, irreversible.
Vaults of this shard are retrieved from local storage while shard-external vaults are requested from the base layer.
Sourcepub async fn get_mint(&self, token: &TokenId) -> Result<Option<Mint>, Error>
pub async fn get_mint(&self, token: &TokenId) -> Result<Option<Mint>, Error>
Get the finalized state of the fungible::Mint for a given token.
§Parameters
token- ID of the token
§Returns
Ok(Some(mint))- If the token existsOk(None)- If the token doesn’t exist, i.e. there is a non-mint vault at that addressErr(error)- If an error occurred
Trait Implementations§
Source§impl<Db: Clone, F: Clone> Clone for FinalizedState<Db, F>
impl<Db: Clone, F: Clone> Clone for FinalizedState<Db, F>
Source§fn clone(&self) -> FinalizedState<Db, F>
fn clone(&self) -> FinalizedState<Db, F>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<Db, F> Freeze for FinalizedState<Db, F>
impl<Db, F> RefUnwindSafe for FinalizedState<Db, F>where
Db: RefUnwindSafe,
F: RefUnwindSafe,
impl<Db, F> Send for FinalizedState<Db, F>
impl<Db, F> Sync for FinalizedState<Db, F>
impl<Db, F> Unpin for FinalizedState<Db, F>
impl<Db, F> UnwindSafe for FinalizedState<Db, F>where
Db: UnwindSafe,
F: UnwindSafe,
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§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