typhoon-protocol 0.1.0

A sample implementation of TYPHOON protocol
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use thiserror::Error;

#[derive(Error, Debug)]
pub enum CacheError {
    #[error("cache source dropped!")]
    SourceDropped,

    #[error("key was not found in cache: {}", .0)]
    KeyNotFound(String),
}

#[cfg(feature = "server")]
pub(crate) struct Versioned<T> {
    pub(crate) value: T,
    pub(crate) version: u64,
}