Struct polymesh_api::polymesh::api::portfolio::PortfolioPagedQueryApi
source · pub struct PortfolioPagedQueryApi<'api> { /* private fields */ }
Implementations§
source§impl<'api> PortfolioPagedQueryApi<'api>
impl<'api> PortfolioPagedQueryApi<'api>
sourcepub fn next_portfolio_number(&self) -> StoragePaged<IdentityId, PortfolioNumber>
pub fn next_portfolio_number(&self) -> StoragePaged<IdentityId, PortfolioNumber>
The next portfolio sequence number of an identity.
sourcepub fn portfolios(
&self,
key_0: IdentityId
) -> StoragePaged<PortfolioNumber, PortfolioName>
pub fn portfolios( &self, key_0: IdentityId ) -> StoragePaged<PortfolioNumber, PortfolioName>
The set of existing portfolios with their names. If a certain pair of a DID and
portfolio number maps to None
then such a portfolio doesn’t exist. Conversely, if a
pair maps to Some(name)
then such a portfolio exists and is called name
.
sourcepub fn name_to_number(
&self,
key_0: IdentityId
) -> StoragePaged<PortfolioName, PortfolioNumber>
pub fn name_to_number( &self, key_0: IdentityId ) -> StoragePaged<PortfolioName, PortfolioNumber>
Inverse map of Portfolios
used to ensure bijectivitiy,
and uniqueness of names in Portfolios
.
sourcepub fn portfolio_asset_count(&self) -> StoragePaged<PortfolioId, u64>
pub fn portfolio_asset_count(&self) -> StoragePaged<PortfolioId, u64>
How many assets with non-zero balance this portfolio contains.
sourcepub fn portfolio_asset_balances(
&self,
key_0: PortfolioId
) -> StoragePaged<Ticker, u128>
pub fn portfolio_asset_balances( &self, key_0: PortfolioId ) -> StoragePaged<Ticker, u128>
The asset balances of portfolios.
sourcepub fn portfolio_locked_assets(
&self,
key_0: PortfolioId
) -> StoragePaged<Ticker, u128>
pub fn portfolio_locked_assets( &self, key_0: PortfolioId ) -> StoragePaged<Ticker, u128>
Amount of assets locked in a portfolio. These assets show up in portfolio balance but can not be transferred away.
sourcepub fn portfolio_custodian(&self) -> StoragePaged<PortfolioId, IdentityId>
pub fn portfolio_custodian(&self) -> StoragePaged<PortfolioId, IdentityId>
The custodian of a particular portfolio. None implies that the identity owner is the custodian.
sourcepub fn portfolios_in_custody(
&self,
key_0: IdentityId
) -> StoragePaged<PortfolioId, bool>
pub fn portfolios_in_custody( &self, key_0: IdentityId ) -> StoragePaged<PortfolioId, bool>
Tracks all the portfolios in custody of a particular identity. Only used by the UIs.
When true
is stored as the value for a given (did, pid)
, it means that pid
is in custody of did
.
false
values are never explicitly stored in the map, and are instead inferred by the absence of a key.
sourcepub fn portfolio_nft(
&self,
key_0: PortfolioId
) -> StoragePaged<(Ticker, NFTId), bool>
pub fn portfolio_nft( &self, key_0: PortfolioId ) -> StoragePaged<(Ticker, NFTId), bool>
The nft associated to the portfolio.
sourcepub fn portfolio_locked_nft(
&self,
key_0: PortfolioId
) -> StoragePaged<(Ticker, NFTId), bool>
pub fn portfolio_locked_nft( &self, key_0: PortfolioId ) -> StoragePaged<(Ticker, NFTId), bool>
All locked nft for a given portfolio.
sourcepub fn pre_approved_portfolios(
&self,
key_0: PortfolioId
) -> StoragePaged<Ticker, bool>
pub fn pre_approved_portfolios( &self, key_0: PortfolioId ) -> StoragePaged<Ticker, bool>
All portfolios that don’t need to affirm the receivement of a given ticker.
Trait Implementations§
source§impl<'api> Clone for PortfolioPagedQueryApi<'api>
impl<'api> Clone for PortfolioPagedQueryApi<'api>
source§fn clone(&self) -> PortfolioPagedQueryApi<'api>
fn clone(&self) -> PortfolioPagedQueryApi<'api>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl<'api> !RefUnwindSafe for PortfolioPagedQueryApi<'api>
impl<'api> Send for PortfolioPagedQueryApi<'api>
impl<'api> Sync for PortfolioPagedQueryApi<'api>
impl<'api> Unpin for PortfolioPagedQueryApi<'api>
impl<'api> !UnwindSafe for PortfolioPagedQueryApi<'api>
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
§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
§fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
§fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
§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>
§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T
. Read more§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from
.source§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T
.