pub trait Ledger<T: Transaction>: Sized {
    type Error: Error;

    // Required method
    fn input<'a, I>(
        &'a self,
        input: <T as Transaction>::Input,
    ) -> Result<&'a <T as Transaction>::Output, Self::Error>;
}
Expand description

Define the Ledger side of the blockchain. This is not really on the blockchain but should be able to maintain a valid state of the overall blockchain at a given Block.

Required Associated Types§

source

type Error: Error

Ledger’s errors

Required Methods§

source

fn input<'a, I>( &'a self, input: <T as Transaction>::Input, ) -> Result<&'a <T as Transaction>::Output, Self::Error>

Object Safety§

This trait is not object safe.

Implementors§