pub struct TokenOwnerStore { /* private fields */ }Expand description
A store for tracking token owners and their balances.
The TokenOwnerStore maintains a mapping between token addresses and their respective
owner’s address and balance. It can be used to quickly retrieve token owner information
without needing to query external sources.
§Fields
values- AHashMapwhere:- The key is the token
Address, representing the address of the token being tracked. - The value is a tuple containing:
- The owner
Addressof the token. - The
Balanceof the owner for the token.
- The owner
- The key is the token
Implementations§
Trait Implementations§
Source§impl Debug for TokenOwnerStore
impl Debug for TokenOwnerStore
Source§impl TokenOwnerFinding for TokenOwnerStore
impl TokenOwnerFinding for TokenOwnerStore
Source§fn find_owner<'life0, 'async_trait>(
&'life0 self,
token: Address,
_min_balance: Balance,
) -> Pin<Box<dyn Future<Output = Result<Option<(Address, Balance)>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_owner<'life0, 'async_trait>(
&'life0 self,
token: Address,
_min_balance: Balance,
) -> Pin<Box<dyn Future<Output = Result<Option<(Address, Balance)>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Finds an address that holds at least
min_balance of the specified token. Read moreAuto Trait Implementations§
impl Freeze for TokenOwnerStore
impl RefUnwindSafe for TokenOwnerStore
impl Send for TokenOwnerStore
impl Sync for TokenOwnerStore
impl Unpin for TokenOwnerStore
impl UnwindSafe for TokenOwnerStore
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