pub trait ServiceOption {
// Required method
fn apply(&self, r: &mut Router);
}Expand description
Example:
pub struct Addr(pub String);
impl ServiceOption for Addr { fn apply(&self, r: &mut Router) {} }
pub struct SelfRoute;
impl ServiceOption for SelfRoute { fn apply(&self, r: &mut Router) {} }