Trait Service

Source
pub trait Service:
    Send
    + Sync
    + Any {
    // Required method
    fn name(&self) -> &'static str;

    // Provided method
    fn metadata(&self) -> HashMap<String, String> { ... }
}
Expand description

Trait for services that can be registered in the container

Required Methods§

Source

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

Returns the service name

Provided Methods§

Source

fn metadata(&self) -> HashMap<String, String>

Returns service metadata

Implementors§