-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: introduce basic vector and set collections to storage (#914)
Co-authored-by: Miraculous Owonubi <[email protected]>
- Loading branch information
Showing
14 changed files
with
1,136 additions
and
280 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//! High-level data structures for storage. | ||
/// This module provides functionality for hashmap data structures. | ||
pub mod unordered_map; | ||
pub use unordered_map::UnorderedMap; | ||
/// This module provides functionality for hashset data structures. | ||
pub mod unordered_set; | ||
pub use unordered_set::UnorderedSet; | ||
/// This module provides functionality for vector data structures. | ||
pub mod vector; | ||
pub use vector::Vector; | ||
/// This module provides functionality for handling errors. | ||
pub mod error; | ||
pub use error::StoreError; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
use thiserror::Error; | ||
|
||
// fixme! macro expects `calimero_storage` to be in deps | ||
use crate::address::PathError; | ||
use crate::interface::StorageError; | ||
|
||
/// General error type for storage operations while interacting with complex collections. | ||
#[derive(Debug, Error)] | ||
#[non_exhaustive] | ||
pub enum StoreError { | ||
/// Error while interacting with storage. | ||
#[error(transparent)] | ||
StorageError(#[from] StorageError), | ||
/// Error while interacting with a path. | ||
#[error(transparent)] | ||
PathError(#[from] PathError), | ||
} |
Oops, something went wrong.