pub trait Subservice: Send {
// Required methods
fn name(&self) -> &'static str;
fn start(&mut self) -> Result<(), ServerError>;
fn stop(&mut self);
fn status(&mut self) -> Status;
// Provided method
fn on_demand(&self) -> bool { ... }
}Expand description
A unit the server hosts. on_demand subservices are never started by the
server itself; they start only through the authenticated control request.
Required Methods§
fn name(&self) -> &'static str
fn start(&mut self) -> Result<(), ServerError>
fn stop(&mut self)
fn status(&mut self) -> Status
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".