From cf8b9ac28d6813bd589f363ad3659dd215bd7cea Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Wed, 1 Nov 2023 17:18:58 +0100 Subject: mask implementation to the rest of the code --- src/storage/mod.rs | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'src/storage') diff --git a/src/storage/mod.rs b/src/storage/mod.rs index 2e4f757..c0835e6 100644 --- a/src/storage/mod.rs +++ b/src/storage/mod.rs @@ -29,12 +29,30 @@ pub enum Error { } pub trait Sto: Sized { - type Builder: RowStore; + type Builder: RowBuilder; type Store: RowStore; type Ref: RowRef; type Value: RowValue; } +pub struct Engine { + bucket: String, + row: T::Builder, +} + +pub enum AnyEngine { + InMemory(Engine), + Garage(Engine), +} +impl AnyEngine { + fn engine(&self) -> &Engine { + match self { + Self::InMemory(x) => x, + Self::Garage(x) => x, + } + } +} + // ------ Row Builder pub trait RowBuilder { -- cgit v1.2.3