identity_iota::iota::rebased::proposals

Trait ProposalT

Source
pub trait ProposalT: Sized {
    type Action;
    type Output;
    type Response: IotaTransactionBlockResponseT<Error = Error, NativeResponse = IotaTransactionBlockResponse>;

    // Required methods
    fn create<'i, 'life0, 'async_trait, S>(
        action: Self::Action,
        expiration: Option<u64>,
        identity: &'i mut OnChainIdentity,
        client: &'life0 IdentityClient<S>,
    ) -> Pin<Box<dyn Future<Output = Result<impl ResultingTransactionT, Error>> + Send + 'async_trait>>
       where 'i: 'async_trait,
             'life0: 'async_trait,
             S: Signer<IotaKeySignature> + Sync + 'async_trait,
             Self: 'async_trait;
    fn into_tx<'i, 'life0, 'async_trait, S>(
        self,
        identity: &'i mut OnChainIdentity,
        client: &'life0 IdentityClient<S>,
    ) -> Pin<Box<dyn Future<Output = Result<impl ProtoTransaction, Error>> + Send + 'async_trait>>
       where 'i: 'async_trait,
             'life0: 'async_trait,
             S: Signer<IotaKeySignature> + Sync + 'async_trait,
             Self: 'async_trait;
    fn parse_tx_effects_internal(
        tx_response: &dyn IotaTransactionBlockResponseT<NativeResponse = IotaTransactionBlockResponse, Error = Error>,
    ) -> Result<Self::Output, Error>;

    // Provided method
    fn parse_tx_effects(
        tx_response: &IotaTransactionBlockResponse,
    ) -> 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

Source

type Response: IotaTransactionBlockResponseT<Error = Error, NativeResponse = IotaTransactionBlockResponse>

Platform-agnostic type of the IotaTransactionBlockResponse

Required Methods§

Source

fn create<'i, 'life0, 'async_trait, S>( action: Self::Action, expiration: Option<u64>, identity: &'i mut OnChainIdentity, client: &'life0 IdentityClient<S>, ) -> Pin<Box<dyn Future<Output = Result<impl ResultingTransactionT, Error>> + Send + 'async_trait>>
where 'i: 'async_trait, 'life0: 'async_trait, S: Signer<IotaKeySignature> + Sync + 'async_trait, Self: 'async_trait,

Creates a new Proposal with the provided action and expiration.

Source

fn into_tx<'i, 'life0, 'async_trait, S>( self, identity: &'i mut OnChainIdentity, client: &'life0 IdentityClient<S>, ) -> Pin<Box<dyn Future<Output = Result<impl ProtoTransaction, Error>> + Send + 'async_trait>>
where 'i: 'async_trait, 'life0: 'async_trait, S: Signer<IotaKeySignature> + Sync + 'async_trait, Self: 'async_trait,

Converts the Proposal into a transaction that can be executed.

Source

fn parse_tx_effects_internal( tx_response: &dyn IotaTransactionBlockResponseT<NativeResponse = IotaTransactionBlockResponse, Error = Error>, ) -> Result<Self::Output, Error>

For internal platform-agnostic usage only.

Provided Methods§

Source

fn parse_tx_effects( tx_response: &IotaTransactionBlockResponse, ) -> 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§

Source§

impl ProposalT for Proposal<ConfigChange>

Source§

type Action = ConfigChange

Source§

type Output = ()

Source§

type Response = IotaTransactionBlockResponseProvider

Source§

impl ProposalT for Proposal<DeactivateDid>

Source§

type Action = DeactivateDid

Source§

type Output = ()

Source§

type Response = IotaTransactionBlockResponseProvider

Source§

impl ProposalT for Proposal<SendAction>

Source§

type Action = SendAction

Source§

type Output = ()

Source§

type Response = IotaTransactionBlockResponseProvider

Source§

impl ProposalT for Proposal<UpdateDidDocument>

Source§

type Action = UpdateDidDocument

Source§

type Output = ()

Source§

type Response = IotaTransactionBlockResponseProvider

Source§

impl ProposalT for Proposal<Upgrade>

Source§

type Action = Upgrade

Source§

type Output = ()

Source§

type Response = IotaTransactionBlockResponseProvider

Source§

impl<F> ProposalT for Proposal<BorrowAction<F>>
where F: BorrowIntentFnT + Send,

Source§

type Action = BorrowAction<F>

Source§

type Output = ()

Source§

type Response = IotaTransactionBlockResponseProvider

Source§

impl<F> ProposalT for Proposal<ControllerExecution<F>>

Source§

type Action = ControllerExecution<F>

Source§

type Output = ()

Source§

type Response = IotaTransactionBlockResponseProvider