Ledger

Trait Ledger 

Source
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>

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§