Trait ProposalT

Source
pub trait ProposalT: Sized {
    type Action;
    type Output;

    // Required methods
    fn create<'i, 'life0, 'life1, 'async_trait, C>(
        action: Self::Action,
        expiration: Option<u64>,
        identity: &'i mut OnChainIdentity,
        controller_token: &'life0 ControllerToken,
        client: &'life1 C,
    ) -> Pin<Box<dyn Future<Output = Result<TransactionBuilder<CreateProposal<'i, Self::Action>>, Error>> + Send + 'async_trait>>
       where 'i: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             C: CoreClientReadOnly + OptionalSync + 'async_trait,
             Self: 'async_trait;
    fn into_tx<'i, 'life0, 'life1, 'async_trait, C>(
        self,
        identity: &'i mut OnChainIdentity,
        controller_token: &'life0 ControllerToken,
        client: &'life1 C,
    ) -> Pin<Box<dyn Future<Output = Result<impl ProtoTransaction, Error>> + Send + 'async_trait>>
       where 'i: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             C: CoreClientReadOnly + OptionalSync + 'async_trait,
             Self: 'async_trait;
    fn parse_tx_effects(
        effects: &IotaTransactionBlockEffects,
    ) -> Result<Self::Output, Error>;
}
Expand description

Interface that allows the creation and execution of an OnChainIdentity’s Proposals.

Required Associated Types§

Source

type Action

The Proposal action’s type.

Source

type Output

The output of the Proposal

Required Methods§

Source

fn create<'i, 'life0, 'life1, 'async_trait, C>( action: Self::Action, expiration: Option<u64>, identity: &'i mut OnChainIdentity, controller_token: &'life0 ControllerToken, client: &'life1 C, ) -> Pin<Box<dyn Future<Output = Result<TransactionBuilder<CreateProposal<'i, Self::Action>>, Error>> + Send + 'async_trait>>
where 'i: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, C: CoreClientReadOnly + OptionalSync + 'async_trait, Self: 'async_trait,

Creates a new Proposal with the provided action and expiration.

Source

fn into_tx<'i, 'life0, 'life1, 'async_trait, C>( self, identity: &'i mut OnChainIdentity, controller_token: &'life0 ControllerToken, client: &'life1 C, ) -> Pin<Box<dyn Future<Output = Result<impl ProtoTransaction, Error>> + Send + 'async_trait>>
where 'i: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, C: CoreClientReadOnly + OptionalSync + 'async_trait, Self: 'async_trait,

Converts the Proposal into a transaction that can be executed.

Source

fn parse_tx_effects( effects: &IotaTransactionBlockEffects, ) -> Result<Self::Output, Error>

Parses the transaction’s effects and returns the output of the Proposal.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§