referrerpolicy=no-referrer-when-downgrade

polkadot_node_subsystem/
lib.rs

1// Copyright (C) Parity Technologies (UK) Ltd.
2// This file is part of Polkadot.
3
4// Polkadot is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8
9// Polkadot is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12// GNU General Public License for more details.
13
14// You should have received a copy of the GNU General Public License
15// along with Polkadot.  If not, see <http://www.gnu.org/licenses/>.
16
17//! Subsystem accumulation.
18//!
19//! Node-side types and generated overseer.
20
21#![deny(missing_docs)]
22#![deny(unused_crate_dependencies)]
23
24pub use polkadot_overseer::{self as overseer, *};
25
26pub use polkadot_node_subsystem_types::{
27	errors::{self, *},
28	ActivatedLeaf,
29};
30
31/// Re-export of all messages type, including the wrapper type.
32pub mod messages {
33	pub use super::overseer::AllMessages;
34	// generated, empty message types
35	pub use super::overseer::messages::*;
36	// deliberately defined messages
37	pub use polkadot_node_subsystem_types::messages::*;
38}
39
40/// A `Result` type that wraps [`SubsystemError`].
41///
42/// [`SubsystemError`]: struct.SubsystemError.html
43pub type SubsystemResult<T> = Result<T, SubsystemError>;
44
45// Simplify usage without having to do large scale modifications of all
46// subsystems at once.
47
48/// Specialized message type originating from the overseer.
49pub type FromOrchestra<M> = polkadot_overseer::gen::FromOrchestra<M, OverseerSignal>;
50
51/// Specialized subsystem instance type of subsystems consuming a particular message type.
52pub type SubsystemInstance<Message> =
53	polkadot_overseer::gen::SubsystemInstance<Message, OverseerSignal>;
54
55/// Spawned subsystem.
56pub type SpawnedSubsystem = polkadot_overseer::gen::SpawnedSubsystem<SubsystemError>;