diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-11-21 09:56:31 +0100 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-11-21 09:56:31 +0100 |
commit | 6e8b2cfc9ff1abf2b4844884d9ebd807d37bd76e (patch) | |
tree | 2eb6dc92646f97fe4452485f4dbeac588c80e5a4 /src/storage | |
parent | bd6c3464e609dc76e119457ea583af0f08eeabb4 (diff) | |
download | aerogramme-6e8b2cfc9ff1abf2b4844884d9ebd807d37bd76e.tar.gz aerogramme-6e8b2cfc9ff1abf2b4844884d9ebd807d37bd76e.zip |
rewrite CryptoKeys with Storage abstraction
Diffstat (limited to 'src/storage')
-rw-r--r-- | src/storage/garage.rs | 6 | ||||
-rw-r--r-- | src/storage/in_memory.rs | 6 | ||||
-rw-r--r-- | src/storage/mod.rs | 3 |
3 files changed, 12 insertions, 3 deletions
diff --git a/src/storage/garage.rs b/src/storage/garage.rs index ad33769..0a22928 100644 --- a/src/storage/garage.rs +++ b/src/storage/garage.rs @@ -85,7 +85,11 @@ impl IRowValue for GrgValue { } } - +impl std::fmt::Debug for GrgValue { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + unimplemented!(); + } +} /* diff --git a/src/storage/in_memory.rs b/src/storage/in_memory.rs index cde2335..49169d7 100644 --- a/src/storage/in_memory.rs +++ b/src/storage/in_memory.rs @@ -90,4 +90,8 @@ impl IRowValue for MemValue { } } - +impl std::fmt::Debug for MemValue { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + unimplemented!(); + } +} diff --git a/src/storage/mod.rs b/src/storage/mod.rs index c948a08..324e6b9 100644 --- a/src/storage/mod.rs +++ b/src/storage/mod.rs @@ -44,6 +44,7 @@ impl std::fmt::Display for StorageError { match self { Self::NotFound => f.write_str("Item not found"), Self::Internal => f.write_str("An internal error occured"), + Self::IncompatibleOrphan => f.write_str("Incompatible orphan"), } } } @@ -110,7 +111,7 @@ pub type RowRef = Box<dyn IRowRef + Send + Sync>; }*/ -pub trait IRowValue +pub trait IRowValue: std::fmt::Debug { fn to_ref(&self) -> RowRef; fn content(&self) -> ConcurrentValues; |