[][src]Derive Macro exonum_derive::ServiceFactory

#[derive(ServiceFactory)]
{
    // Attributes available to this derive:
    #[service_factory]
}

Derives ServiceFactory trait.

Container Attributes

proto_sources

#[service_factory(proto_sources = "path")]

Path to the module that was generated by the build script, which contains the original Protobuf source files of the service. If omitted, no Protobuf sources will be included with the service artifact.

crate

#[service_factory(crate = "path")]

Prefix of the exonum crate has two main values - crate or exonum. The default value is exonum.

artifact_name

#[service_factory(artifact_name = "string")]

Overrides the artifact name, which is set to the crate name by default.

artifact_version

#[service_factory(artifact_version = "string")]

Overrides the artifact version, which is set to the crate version by default.

with_constructor

#[service_factory(with_constructor = "path")]

Overrides service constructor by a custom function with the following signature:

fn(&ServiceFactoryImpl) -> Box<dyn Service>