sov-first-read-last-write-cache 0.2.0

A specialized caching layer used in the Sovereign SDK module system
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[cfg(test)]
pub mod test_util {
    use std::sync::Arc;

    use crate::{CacheKey, CacheValue};

    pub(crate) fn create_key(key: u8) -> CacheKey {
        CacheKey {
            key: Arc::new(vec![key]),
        }
    }

    pub(crate) fn create_value(v: u8) -> Option<CacheValue> {
        Some(CacheValue {
            value: Arc::new(vec![v]),
        })
    }
}