net-sync 0.0.1

Abstraction for synchronizing game-entities across the network.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::fmt::{Display, Formatter};

/// Wrapper for all errors that can occur in `crossterm`.
#[derive(Debug)]
pub enum ErrorKind {
    CompressionError(String),
}

impl Display for ErrorKind {
    fn fmt(&self, fmt: &mut Formatter<'_>) -> std::fmt::Result {
        match self {
            ErrorKind::CompressionError(e) => write!(fmt, "Serialisation error occurred: {:?}", e),
        }
    }
}