[][src]Trait exonum_rust_runtime::GenericCall

pub trait GenericCall<Ctx> {
    type Output;
    fn generic_call(
        &self,
        context: Ctx,
        method: MethodDescriptor,
        args: Vec<u8>
    ) -> Self::Output; }

Generic / low-level stub implementation which is defined for any method in any interface.

Associated Types

type Output

Type of values output by the stub.

Loading content...

Required methods

fn generic_call(
    &self,
    context: Ctx,
    method: MethodDescriptor,
    args: Vec<u8>
) -> Self::Output

Calls a stub method.

Loading content...

Implementations on Foreign Types

impl GenericCall<u32> for (PublicKey, SecretKey)[src]

type Output = Verified<AnyTx>

impl GenericCall<u32> for KeyPair[src]

type Output = Verified<AnyTx>

Loading content...

Implementors

impl GenericCall<u32> for TxStub[src]

type Output = AnyTx

impl<'_> GenericCall<()> for Broadcaster<'_>[src]

Signs and broadcasts a transaction to the other nodes in the network.

The transaction is signed by the service keypair of the node. The same input transaction will lead to the identical transaction being broadcast. If this is undesired, add a nonce field to the input transaction (e.g., a u64) and change it between the calls.

Return value

Returns the hash of the created transaction, or an error if the transaction cannot be broadcast. An error means that the node is being shut down.

type Output = Result<Hash, SendError>

Loading content...