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 Proposal
s.
Required Associated Types§
Sourcetype Response: IotaTransactionBlockResponseT<Error = Error, NativeResponse = IotaTransactionBlockResponse>
type Response: IotaTransactionBlockResponseT<Error = Error, NativeResponse = IotaTransactionBlockResponse>
Platform-agnostic type of the IotaTransactionBlockResponse
Required Methods§
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn parse_tx_effects_internal(
tx_response: &dyn IotaTransactionBlockResponseT<NativeResponse = IotaTransactionBlockResponse, Error = Error>,
) -> Result<Self::Output, Error>
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§
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.