Struct exonum_configuration::Service
[−]
[src]
pub struct Service {}
Configuration service.
Trait Implementations
impl Debug for Service
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Default for Service
[src]
impl Service for Service
[src]
fn service_name(&self) -> &'static str
[src]
A comprehensive string service name. Must be unique within the blockchain. Read more
fn service_id(&self) -> u16
[src]
Service identifier for database schema and service messages. Must be unique within the blockchain. Read more
fn state_hash(&self, snapshot: &Snapshot) -> Vec<Hash>
[src]
Returns a list of root hashes of tables that determine the current state of the service database. These hashes are collected from all the services in a common ProofMapIndex
accessible in the core schema as [state_hash_aggregator
][1]. Read more
fn tx_from_raw(
&self,
raw: RawTransaction
) -> Result<Box<Transaction>, EncodingError>
[src]
&self,
raw: RawTransaction
) -> Result<Box<Transaction>, EncodingError>
Tries to create a Transaction
from the given raw message. Read more
fn public_api_handler(&self, ctx: &ApiContext) -> Option<Box<Handler>>
[src]
Returns an API handler for public requests. The handler is mounted on the /api/services/{service_name}
path at [the public listen address][pub-addr] of all full nodes in the blockchain network. Read more
fn private_api_handler(&self, ctx: &ApiContext) -> Option<Box<Handler>>
[src]
Returns an API handler for private requests. The handler is mounted on the /api/services/{service_name}
path at [the private listen address][private-addr] of all full nodes in the blockchain network. Read more
fn initialize(&self, fork: &mut Fork) -> Value
[src]
Initializes the information schema of the service and generates an initial service configuration. Called on genesis block creation. Read more
fn handle_commit(&self, context: &ServiceContext)
[src]
Handles block commit. This handler is invoked for each service after commit of the block. For example, a service can create one or more transactions if a specific condition has occurred. Read more