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