pub struct CallApi<'api> { /* private fields */ }Implementations§
source§impl<'api> CallApi<'api>
impl<'api> CallApi<'api>
sourcepub fn create_portfolio(&self, name: PortfolioName) -> Result<WrappedCall<'api>>
pub fn create_portfolio(&self, name: PortfolioName) -> Result<WrappedCall<'api>>
Creates a portfolio with the given name.
sourcepub fn delete_portfolio(
&self,
num: PortfolioNumber
) -> Result<WrappedCall<'api>>
pub fn delete_portfolio( &self, num: PortfolioNumber ) -> Result<WrappedCall<'api>>
Deletes a user portfolio. A portfolio can be deleted only if it has no funds.
Errors
PortfolioDoesNotExistifnumdoesn’t reference a valid portfolio.PortfolioNotEmptyif the portfolio still holds any asset
Permissions
- Portfolio
sourcepub fn move_portfolio_funds(
&self,
from: PortfolioId,
to: PortfolioId,
items: Vec<MovePortfolioItem>
) -> Result<WrappedCall<'api>>
pub fn move_portfolio_funds( &self, from: PortfolioId, to: PortfolioId, items: Vec<MovePortfolioItem> ) -> Result<WrappedCall<'api>>
Moves a token amount from one portfolio of an identity to another portfolio of the same identity. Must be called by the custodian of the sender. Funds from deleted portfolios can also be recovered via this method.
A short memo can be added to to each token amount moved.
Errors
PortfolioDoesNotExistif one or both of the portfolios reference an invalid portfolio.destination_is_same_portfolioif both sender and receiver portfolio are the sameDifferentIdentityPortfoliosif the sender and receiver portfolios belong to different identitiesUnauthorizedCustodianif the caller is not the custodian of the from portfolioInsufficientPortfolioBalanceif the sender does not have enough free balanceNoDuplicateAssetsAllowedthe same ticker can’t be repeated in the items vector.
Permissions
- Portfolio
sourcepub fn rename_portfolio(
&self,
num: PortfolioNumber,
to_name: PortfolioName
) -> Result<WrappedCall<'api>>
pub fn rename_portfolio( &self, num: PortfolioNumber, to_name: PortfolioName ) -> Result<WrappedCall<'api>>
Renames a non-default portfolio.
Errors
PortfolioDoesNotExistifnumdoesn’t reference a valid portfolio.
Permissions
- Portfolio
sourcepub fn quit_portfolio_custody(
&self,
pid: PortfolioId
) -> Result<WrappedCall<'api>>
pub fn quit_portfolio_custody( &self, pid: PortfolioId ) -> Result<WrappedCall<'api>>
When called by the custodian of portfolio_id,
allows returning the custody of the portfolio to the portfolio owner unilaterally.
Errors
UnauthorizedCustodianif the caller is not the current custodian ofportfolio_id.
Permissions
- Portfolio
pub fn accept_portfolio_custody( &self, auth_id: u64 ) -> Result<WrappedCall<'api>>
sourcepub fn move_portfolio_funds_v2(
&self,
from: PortfolioId,
to: PortfolioId,
funds: Vec<Fund>
) -> Result<WrappedCall<'api>>
pub fn move_portfolio_funds_v2( &self, from: PortfolioId, to: PortfolioId, funds: Vec<Fund> ) -> Result<WrappedCall<'api>>
Moves fungigle an non-fungible tokens from one portfolio of an identity to another portfolio of the same identity. Must be called by the custodian of the sender. Funds from deleted portfolios can also be recovered via this method.
A short memo can be added to to each token amount moved.
Errors
PortfolioDoesNotExistif one or both of the portfolios reference an invalid portfolio.destination_is_same_portfolioif both sender and receiver portfolio are the sameDifferentIdentityPortfoliosif the sender and receiver portfolios belong to different identitiesUnauthorizedCustodianif the caller is not the custodian of the from portfolioInsufficientPortfolioBalanceif the sender does not have enough free balanceNoDuplicateAssetsAllowedthe same ticker can’t be repeated in the items vector.InvalidTransferNFTNotOwnedif the caller is trying to move an NFT he doesn’t own.InvalidTransferNFTIsLockedif the caller is trying to move a locked NFT.
Permissions
- Portfolio
Trait Implementations§
Auto Trait Implementations§
impl<'api> !RefUnwindSafe for CallApi<'api>
impl<'api> Send for CallApi<'api>
impl<'api> Sync for CallApi<'api>
impl<'api> Unpin for CallApi<'api>
impl<'api> !UnwindSafe for CallApi<'api>
Blanket Implementations§
§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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.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> 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 Swhere
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for Swhere T: Bounded, S: TryInto<T>,
source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T.