Trait nuts_container::Service
source · pub trait Service<B: Backend> {
type Migration: Migration;
// Required methods
fn need_top_id() -> bool;
fn migration() -> Self::Migration;
}Expand description
A service running on top of a Container.
A concrete service should implement this trait. Later, such a service can
be instantiated with Container::open_service resp.
Container::create_service.
Required Associated Types§
Required Methods§
sourcefn need_top_id() -> bool
fn need_top_id() -> bool
Returns true if the service requires a top-id.
If a top-id is required, a top-id is aquired and stored in the header of the container when creating a service-instance.
Object Safety§
This trait is not object safe.