pub trait Modifier<ServerT: Server>: Send + 'static {
// Required methods
fn modify(self: Box<Self>, server: &mut ServerT) -> bool;
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>;
}Expand description
What modifies a Server via Command::Modify.
It is Send and 'static because it’s moved accross threads, from an App to the task
running the Server.
We do not use a trait like (FnOnce(&mut ServerT)) + Send + 'static,
because it can not (yet) be implemented by users.
Required Methods§
Sourcefn modify(self: Box<Self>, server: &mut ServerT) -> bool
fn modify(self: Box<Self>, server: &mut ServerT) -> bool
Stops server, perform modification, and restarts server if true was returned.