use std::hash::Hash;
use serde::{Deserialize, Serialize};
#[allow(unused_imports)] use crate::{serialization::to_vec, Key, Keyed};
#[derive(Debug, PartialOrd, PartialEq, Eq, Ord, Clone, Hash)]
pub struct RandomKey {
val: i64,
}
impl RandomKey {
#[allow(dead_code)] pub fn new(val: i64) -> Self {
Self { val }
}
}
#[derive(Serialize, Debug, Clone, PartialEq, Eq, Deserialize)]
pub struct RandomData {
pub a: i64,
pub b: String,
}
impl Keyed for RandomData {
type K = i64;
fn key(&self) -> i64 {
self.a
}
}