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<AssetId, u128>
pub fn portfolio_asset_balances( &self, key_0: PortfolioId, ) -> StoragePaged<AssetId, u128>
The asset balances of portfolios.
Sourcepub fn portfolio_locked_assets(
&self,
key_0: PortfolioId,
) -> StoragePaged<AssetId, u128>
pub fn portfolio_locked_assets( &self, key_0: PortfolioId, ) -> StoragePaged<AssetId, 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<(AssetId, NFTId), bool>
pub fn portfolio_nft( &self, key_0: PortfolioId, ) -> StoragePaged<(AssetId, NFTId), bool>
The nft associated to the portfolio.
Sourcepub fn portfolio_locked_nft(
&self,
key_0: PortfolioId,
) -> StoragePaged<(AssetId, NFTId), bool>
pub fn portfolio_locked_nft( &self, key_0: PortfolioId, ) -> StoragePaged<(AssetId, NFTId), bool>
All locked nft for a given portfolio.
Sourcepub fn pre_approved_portfolios(
&self,
key_0: PortfolioId,
) -> StoragePaged<AssetId, bool>
pub fn pre_approved_portfolios( &self, key_0: PortfolioId, ) -> StoragePaged<AssetId, bool>
All portfolios that don’t need to affirm the receivement of a given [AssetId
].
Sourcepub fn allowed_custodians(
&self,
key_0: IdentityId,
) -> StoragePaged<IdentityId, bool>
pub fn allowed_custodians( &self, key_0: IdentityId, ) -> StoragePaged<IdentityId, bool>
Custodians allowed to create and take custody of portfolios on an id’s behalf.
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> Freeze for PortfolioPagedQueryApi<'api>
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
Source§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
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>
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>
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 moreSource§impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
fn into_tuple(self) -> Dest
Source§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 moreSource§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
Source§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
.