weirdnet-sync 0.3.0

Weirdnet sync: hybrid logical clocks, an op log, LWW and OR-set merge, tombstone GC, SyncKey page sealing, a device roster with self-cert, revocation and key rotation with re-admission, and the weirdnet-sync/v1 pull protocol over weirdnet-net.
Documentation
use thiserror::Error;

#[derive(Debug, Error)]
pub enum SyncError {
    #[error("{0}")]
    Crypto(String),
    #[error("refused: {0}")]
    Refused(String),
    #[error("codec: {0}")]
    Codec(String),
    #[error("{0}")]
    Protocol(String),
}

impl From<weirdnet_keys::KeysError> for SyncError {
    fn from(e: weirdnet_keys::KeysError) -> Self {
        SyncError::Crypto(e.to_string())
    }
}

impl From<weirdnet_net::NetError> for SyncError {
    fn from(e: weirdnet_net::NetError) -> Self {
        SyncError::Crypto(e.to_string())
    }
}

pub type Result<T> = std::result::Result<T, SyncError>;