pub struct TokensCollector { /* private fields */ }Expand description
Tokens Collector.
Implementations§
Source§impl TokensCollector
impl TokensCollector
Sourcepub fn new(
action: Option<&impl HasSwapParams>,
extra_capacity: usize,
) -> TokensCollector
pub fn new( action: Option<&impl HasSwapParams>, extra_capacity: usize, ) -> TokensCollector
Create a new TokensCollector.
Sourcepub fn insert_token(&mut self, token: &Pubkey) -> bool
pub fn insert_token(&mut self, token: &Pubkey) -> bool
Insert a new token.
Sourcepub fn into_vec(
self,
token_map: &impl TokenMapAccess,
) -> Result<Vec<Pubkey>, TokenConfigError>
pub fn into_vec( self, token_map: &impl TokenMapAccess, ) -> Result<Vec<Pubkey>, TokenConfigError>
Convert to a vec.
Sourcepub fn to_feeds(
&self,
token_map: &impl TokenMapAccess,
) -> Result<TokensWithFeed, TokenConfigError>
pub fn to_feeds( &self, token_map: &impl TokenMapAccess, ) -> Result<TokensWithFeed, TokenConfigError>
Convert to TokensWithFeed.
Auto Trait Implementations§
impl Freeze for TokensCollector
impl RefUnwindSafe for TokensCollector
impl Send for TokensCollector
impl Sync for TokensCollector
impl Unpin for TokensCollector
impl UnwindSafe for TokensCollector
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> 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