Skip to main content

Subservice

Trait Subservice 

Source
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§

Source

fn name(&self) -> &'static str

Source

fn start(&mut self) -> Result<(), ServerError>

Source

fn stop(&mut self)

Source

fn status(&mut self) -> Status

Provided Methods§

Source

fn on_demand(&self) -> bool

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§