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§
Required Methods§
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.