use serde::{Deserialize, Serialize};
use std::fmt::{Display, Formatter};
#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Hash)]
pub struct ConnectionId(u64);
impl From<u64> for ConnectionId {
fn from(value: u64) -> Self {
Self(value)
}
}
impl Into<u64> for ConnectionId {
fn into(self) -> u64 {
self.0
}
}
impl Display for ConnectionId {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
self.0.fmt(f)
}
}