use async_trait::async_trait;
#[async_trait]
#[allow(unused)]
pub trait Route<M> {
fn name(&self) -> &'static str;
}
#[cfg(test)]
mod tests {
use super::Route;
use async_trait::async_trait;
#[test]
fn can_implement_route() {
struct MyModel {
#[allow(unused)]
pub a: String,
#[allow(unused)]
pub b: String,
}
struct MyRoute {
}
#[async_trait]
impl Route<MyModel> for MyRoute {
fn name(&self) -> &'static str {
"my-route"
}
}
}
}