use std::{collections::VecDeque, marker::PhantomData};
use super::{CheckErr, Controller};
pub struct NullCtrl<T> {
_phantom: PhantomData<T>
}
impl<T> Controller for NullCtrl<T> {
type Item = T;
fn size_hint(&self) -> Option<usize> {
None
}
fn is_full(&self, _q: &VecDeque<T>) -> bool {
false
}
fn is_overflow(&self, _q: &VecDeque<T>) -> bool {
false
}
fn check(
&self,
_q: &VecDeque<Self::Item>,
_item: &Self::Item
) -> Result<(), CheckErr> {
Ok(())
}
fn reg(&mut self, _q: &VecDeque<Self::Item>, _n: &Self::Item) {}
fn dereg(&mut self, _n: &Self::Item) {}
}