macro_rules! require_index_tracking {
($name: literal, $obs: ident) => { ... };
}
Expand description
Use in the constructor of your component which requires index tracking of a
super::MapObserver
. See super::CanTrack
for details.
As an example, if you are developing the type MyCustomScheduler<O>
which requires novelty
tracking, use this in your constructor:
impl<C, O> MyCustomScheduler<C, O>
where
O: MapObserver,
C: CanTrack + AsRef<O>,
{
pub fn new(obs: &C) -> Self {
require_index_tracking!("MyCustomScheduler", C);
todo!("Construct your type")
}
}