[][src]Struct substrate_service::Service

pub struct Service<Components: Components> {
    pub config: FactoryFullConfiguration<Components::Factory>,
    // some fields omitted
}

Substrate service.

Fields

config: FactoryFullConfiguration<Components::Factory>

Configuration of this Service

Methods

impl<Components: Components> Service<Components>[src]

pub fn new(
    config: FactoryFullConfiguration<Components::Factory>,
    task_executor: TaskExecutor
) -> Result<Self, Error>
[src]

Creates a new service.

pub fn authority_key(&self) -> Option<Pair>[src]

give the authority key, if we are an authority and have a key

pub fn telemetry(&self) -> Option<Arc<Telemetry>>[src]

return a shared instance of Telemtry (if enabled)

impl<Components> Service<Components> where
    Components: Components
[src]

pub fn client(&self) -> Arc<ComponentClient<Components>>[src]

Get shared client instance.

pub fn network(&self) -> Arc<NetworkService<Components::Factory>>[src]

Get shared network instance.

pub fn transaction_pool(
    &self
) -> Arc<TransactionPool<Components::TransactionPoolApi>>
[src]

Get shared transaction pool instance.

pub fn inherents_pool(
    &self
) -> Arc<InherentsPool<ComponentExtrinsic<Components>>>
[src]

Get shared inherents pool instance.

pub fn keystore(&self) -> &Keystore[src]

Get shared keystore.

pub fn on_exit(&self) -> Exit[src]

Get a handle to a future that will resolve on exit.

Trait Implementations

impl<Components> Drop for Service<Components> where
    Components: Components
[src]

Auto Trait Implementations

impl<Components> Sync for Service<Components> where
    <Components as Components>::Backend: Send + Sync,
    <<Components as Components>::Factory as ServiceFactory>::Block: Block + Send + Sync,
    <<Components as Components>::Factory as ServiceFactory>::Configuration: Sync,
    <Components as Components>::Executor: Send + Sync,
    <<<Components as Components>::Factory as ServiceFactory>::Block as Block>::Extrinsic: Decode + Encode + Send + Sync,
    <Components as Components>::Factory: ServiceFactory,
    <<<Components as Components>::Factory as ServiceFactory>::Block as Block>::Header: Decode + Encode + Header + Send,
    <<<<Components as Components>::Factory as ServiceFactory>::Block as Block>::Header as Header>::Number: Decode + Encode + Send + Sync,
    <Components as Components>::RuntimeApi: Send + Sync,
    <Components as Components>::TransactionPoolApi: ChainApi + Send + Sync

impl<Components> Send for Service<Components> where
    <Components as Components>::Backend: Send + Sync,
    <<Components as Components>::Factory as ServiceFactory>::Block: Block + Send + Sync,
    <<Components as Components>::Factory as ServiceFactory>::Configuration: Send,
    <Components as Components>::Executor: Send + Sync,
    <<<Components as Components>::Factory as ServiceFactory>::Block as Block>::Extrinsic: Decode + Encode + Send + Sync,
    <Components as Components>::Factory: ServiceFactory,
    <<<Components as Components>::Factory as ServiceFactory>::Block as Block>::Header: Decode + Encode + Header + Send,
    <<<<Components as Components>::Factory as ServiceFactory>::Block as Block>::Header as Header>::Number: Decode + Encode + Send + Sync,
    <Components as Components>::RuntimeApi: Send + Sync,
    <Components as Components>::TransactionPoolApi: ChainApi + Send + Sync

impl<Components> Unpin for Service<Components> where
    <<Components as Components>::Factory as ServiceFactory>::Configuration: Unpin,
    <Components as Components>::Factory: ServiceFactory

impl<Components> !UnwindSafe for Service<Components>

impl<Components> !RefUnwindSafe for Service<Components>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T[src]

impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 
[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> Erased for T[src]

impl<T> Typeable for T where
    T: Any
[src]