pub trait StorageSubstrate {
type Slot;
type LedgerMemory;
type MemoryHandle;
type Error;
// Required methods
fn open_ledger(&self) -> Result<Self::LedgerMemory, Self::Error>;
fn open_slot(
&self,
slot: &AllocationSlotDescriptor,
) -> Result<Self::MemoryHandle, Self::Error>;
fn describe_slot(&self, slot: &Self::Slot) -> AllocationSlotDescriptor;
}Expand description
StorageSubstrate
Physical storage provider for the ledger anchor and allocation slots.
Required Associated Types§
Sourcetype LedgerMemory
type LedgerMemory
Ledger memory handle.
Sourcetype MemoryHandle
type MemoryHandle
Allocation memory handle.
Required Methods§
Sourcefn open_ledger(&self) -> Result<Self::LedgerMemory, Self::Error>
fn open_ledger(&self) -> Result<Self::LedgerMemory, Self::Error>
Open the ledger anchor.
Sourcefn open_slot(
&self,
slot: &AllocationSlotDescriptor,
) -> Result<Self::MemoryHandle, Self::Error>
fn open_slot( &self, slot: &AllocationSlotDescriptor, ) -> Result<Self::MemoryHandle, Self::Error>
Open an allocation slot after validation has produced a session.
Sourcefn describe_slot(&self, slot: &Self::Slot) -> AllocationSlotDescriptor
fn describe_slot(&self, slot: &Self::Slot) -> AllocationSlotDescriptor
Describe a native slot as a durable allocation slot descriptor.