use serde::Deserialize;
use serde::Serialize;
use std::borrow::Cow;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ParticleParameters<'ctx> {
pub init_peer_id: Cow<'ctx, str>,
pub particle_id: Cow<'ctx, str>,
pub timestamp: u64,
pub ttl: u32,
pub current_peer_id: Cow<'ctx, str>,
}
impl<'ctx> ParticleParameters<'ctx> {
pub fn new(
init_peer_id: Cow<'ctx, str>,
particle_id: Cow<'ctx, str>,
timestamp: u64,
ttl: u32,
current_peer_id: Cow<'ctx, str>,
) -> Self {
Self {
init_peer_id,
particle_id,
timestamp,
ttl,
current_peer_id,
}
}
}