mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 12:51:02 +00:00
3cc5a1eee9
* feat/overseer: introduce closure init Enables removal of the connected/disconnected overseer state. * feat/overseer: allow replacement logic to access the original Allows to re-use init-once types, which would otherwise error. * feat/overseer: introduce external connector Preparation for removal of `AllSubsystems` which is another prerequisite for removing the connect/disconnect state. * fix/test: replace needs closure * fixup * simplify * mea culpa * all-subsystems-gen test
18 lines
313 B
Rust
18 lines
313 B
Rust
#![allow(dead_code)]
|
|
|
|
use polkadot_overseer_all_subsystems_gen::AllSubsystemsGen;
|
|
|
|
#[derive(Clone, AllSubsystemsGen)]
|
|
struct AllSubsystems<A, B> {
|
|
a: A,
|
|
b: B,
|
|
}
|
|
|
|
fn main() {
|
|
let all = AllSubsystems::<u8, u16> {
|
|
a: 0u8,
|
|
b: 1u16,
|
|
};
|
|
let _all: AllSubsystems<_,_> = all.replace_a::<u32,_>(|_| 777_777u32);
|
|
}
|