pub struct TokensWithFeed {
pub tokens: Vec<Pubkey>,
pub feeds: Vec<Pubkey>,
pub providers: Vec<u8>,
pub nums: Vec<u16>,
}Expand description
Tokens with feed.
Fields§
§tokens: Vec<Pubkey>Tokens that require prices,
which must be of the same length with feeds.
feeds: Vec<Pubkey>Token feeds for the tokens,
which must be of the same length with tokens.
providers: Vec<u8>Providers set,
which must be of the same length with nums.
nums: Vec<u16>The numbers of tokens of each provider.
Implementations§
Source§impl TokensWithFeed
impl TokensWithFeed
Sourcepub fn try_from_records(
records: Vec<TokenRecord>,
) -> Result<Self, TokenConfigError>
pub fn try_from_records( records: Vec<TokenRecord>, ) -> Result<Self, TokenConfigError>
Trait Implementations§
Source§impl BorshDeserialize for TokensWithFeed
impl BorshDeserialize for TokensWithFeed
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for TokensWithFeed
impl BorshSerialize for TokensWithFeed
Source§impl Clone for TokensWithFeed
impl Clone for TokensWithFeed
Source§fn clone(&self) -> TokensWithFeed
fn clone(&self) -> TokensWithFeed
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 TokensWithFeed
impl Debug for TokensWithFeed
Source§impl<'de> Deserialize<'de> for TokensWithFeed
impl<'de> Deserialize<'de> for TokensWithFeed
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl IdlBuild for TokensWithFeed
impl IdlBuild for TokensWithFeed
Source§fn create_type() -> Option<IdlTypeDef>
fn create_type() -> Option<IdlTypeDef>
Create an IDL type definition for the type. Read more
Source§fn insert_types(types: &mut BTreeMap<String, IdlTypeDef>)
fn insert_types(types: &mut BTreeMap<String, IdlTypeDef>)
Insert all types that are included in the current type definition to the given map.
Source§fn get_full_path() -> String
fn get_full_path() -> String
Get the full module path of the type. Read more
Auto Trait Implementations§
impl Freeze for TokensWithFeed
impl RefUnwindSafe for TokensWithFeed
impl Send for TokensWithFeed
impl Sync for TokensWithFeed
impl Unpin for TokensWithFeed
impl UnwindSafe for TokensWithFeed
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