nostrstore 0.1.0

nostrstore is a lightweight, decentralized key-value store designed to work seamlessly with the Nostr protocol
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
pub mod counter;

/// A trait representing an operation that can be applied to a value.
/// This trait is used for events that can be applied to a value, such as incrementing or decrementing a counter.
pub trait Operation: Sized {
    type Value;

    fn default() -> Self::Value;
    fn deserialize(value: String) -> Result<Self, Box<dyn std::error::Error>>;
    fn serialize(&self) -> String;
    fn apply(&self, value: Self::Value) -> Self::Value;
}