#[exonum_interface]
Expand description
Derives an Exonum service interface for the specified trait.
See the documentation of the Exonum crate for more information.
§Attributes
§crate
#[exonum_interface(crate = "path")]
Prefix of the exonum
crate has two main values - crate
or exonum
. The default value
is exonum
.
§removed_method_ids
#[exonum_interface(removed_method_ids(0, 2, 5))]
Marks methods with the following IDs as removed. An attempt to invoke the method with corresponding ID will always result in an error.
Using this attribute is a recommended way to remove methods from interface, since it guarantees that method ID won’t be reused.
This attribute cannot be used with auto_ids
attribute set.
§id_auto_increment
#[exonum_interface(auto_ids)]
Enables automatic ID assignment for interface methods. This may be useful for writing tests, but not recommended for production code.
§Method attributes
§interface_method
#[interface_method(id = 0)]
All the method in the trait with exonum_interface
attribute should have interface_method
attribute with unsigned integer value. All the method IDs should be unique.