[][src]Trait exonum_middleware_service::MiddlewareInterface

pub trait MiddlewareInterface<Ctx> {
    type Output;
    fn checked_call(&self, context: Ctx, arg: CheckedCall) -> Self::Output;
fn batch(&self, context: Ctx, arg: Batch) -> Self::Output; }

Transactional interface of the utilities service.

Associated Types

type Output

Value output by the interface.

Loading content...

Required methods

fn checked_call(&self, context: Ctx, arg: CheckedCall) -> Self::Output

Performs a checked call to the service. The call is dispatched only if the version of the service matches the version requirement mentioned in the call.

Authorization

The inner call is authorized in the same way as the checked_call.

fn batch(&self, context: Ctx, arg: Batch) -> Self::Output

Performs batch execution of several transactions. Transactions are executed in the order they are mentioned in the batch. If execution of the constituent transaction fails, the method returns an error, thus rolling back any changes performed by earlier transactions.

Authorization

All transactions are authorized in the same way as the batch call itself.

Loading content...

Trait Implementations

impl<'a> Interface<'a> for dyn MiddlewareInterface<ExecutionContext<'a>, Output = Result<(), ExecutionError>>[src]

Implementors

impl<'_> MiddlewareInterface<ExecutionContext<'_>> for MiddlewareService[src]

type Output = Result<(), ExecutionError>

impl<Ctx, T: GenericCall<Ctx>> MiddlewareInterface<Ctx> for T[src]

type Output = <T as GenericCall<Ctx>>::Output

Loading content...