[][src]Trait exonum_rust_runtime::ServiceFactory

pub trait ServiceFactory: Send + Debug + 'static {
    fn artifact_id(&self) -> ArtifactId;
fn artifact_protobuf_spec(&self) -> ArtifactProtobufSpec;
fn create_instance(&self) -> Box<dyn Service>; }

Describes a service instance factory for the specific Rust artifact.

Usually, ServiceFactory can be derived using the ServiceFactory macro.

Required methods

fn artifact_id(&self) -> ArtifactId

Returns the unique artifact identifier corresponding to the factory.

fn artifact_protobuf_spec(&self) -> ArtifactProtobufSpec

Returns the Protobuf specification used by the instances of this service.

fn create_instance(&self) -> Box<dyn Service>

Creates a new service instance.

Loading content...

Implementors

Loading content...