pub struct BasicTokenStore { /* private fields */ }Expand description
A basic TokenStore implementation.
Implementations§
Source§impl BasicTokenStore
impl BasicTokenStore
Sourcepub fn new() -> BasicTokenStore
pub fn new() -> BasicTokenStore
Creates a new BasicTokenStore
Trait Implementations§
Source§impl Clone for BasicTokenStore
impl Clone for BasicTokenStore
Source§fn clone(&self) -> BasicTokenStore
fn clone(&self) -> BasicTokenStore
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 moreSource§impl Debug for BasicTokenStore
impl Debug for BasicTokenStore
Source§impl Default for BasicTokenStore
impl Default for BasicTokenStore
Source§fn default() -> BasicTokenStore
fn default() -> BasicTokenStore
Returns the “default value” for a type. Read more
Source§impl<'a> TokenStore<'a> for BasicTokenStore
impl<'a> TokenStore<'a> for BasicTokenStore
Source§fn get(
&'a self,
chain_id: u64,
id: TokenId,
) -> Option<<BasicTokenStore as TokenStore<'a>>::Item>
fn get( &'a self, chain_id: u64, id: TokenId, ) -> Option<<BasicTokenStore as TokenStore<'a>>::Item>
Returns the value corresponding to the given id.
Source§fn get_mut(&mut self, chain_id: u64, id: TokenId) -> Option<&mut Token>
fn get_mut(&mut self, chain_id: u64, id: TokenId) -> Option<&mut Token>
Returns the mutable value corresponding to the given id.
Source§fn contains(&self, chain_id: u64, id: TokenId) -> bool
fn contains(&self, chain_id: u64, id: TokenId) -> bool
Returns
true if the store contains a value for the specified id.Source§fn symbols(&'a self, chain_id: Option<u64>) -> Vec<String>
fn symbols(&'a self, chain_id: Option<u64>) -> Vec<String>
Returns the symbols from all the tokens in the store.
Source§fn addresses(&'a self, chain_id: Option<u64>) -> Vec<Address>
fn addresses(&'a self, chain_id: Option<u64>) -> Vec<Address>
Returns the addresses from all the tokens in the store.
Auto Trait Implementations§
impl Freeze for BasicTokenStore
impl RefUnwindSafe for BasicTokenStore
impl Send for BasicTokenStore
impl Sync for BasicTokenStore
impl Unpin for BasicTokenStore
impl UnwindSafe for BasicTokenStore
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