use crate::{error::Result, header::SframeHeader};
use std::ops::Deref;
mod replay_attack_protection;
mod sliding_window;
pub use replay_attack_protection::ReplayAttackProtection;
pub trait FrameValidation {
fn validate(&self, header: &SframeHeader) -> Result<()>;
}
pub type FrameValidationBox = Box<dyn FrameValidation>;
impl FrameValidation for FrameValidationBox {
fn validate(&self, header: &SframeHeader) -> Result<()> {
self.deref().validate(header)
}
}