// Copyright (C) 2023 Parity Technologies (UK) Ltd. // SPDX-License-Identifier: Apache-2.0 // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #![allow(clippy::all)] #![allow(dead_code)] // for orchestra events use futures::executor::ThreadPool; use orchestra::{self as orchestra, Spawner, *}; #[derive(Debug, Clone, Copy)] pub enum SigSigSig { Conclude, Foo, } #[derive(Debug, Clone)] pub struct DummySpawner(pub ThreadPool); impl Spawner for DummySpawner { fn spawn_blocking( &self, _task_name: &'static str, _subsystem_name: Option<&'static str>, future: futures::future::BoxFuture<'static, ()>, ) { self.0.spawn_ok(future); } fn spawn( &self, _task_name: &'static str, _subsystem_name: Option<&'static str>, future: futures::future::BoxFuture<'static, ()>, ) { self.0.spawn_ok(future); } } /// The external event. #[derive(Debug, Clone)] pub struct EvX; impl EvX { pub fn focus<'a, T>(&'a self) -> Result { unimplemented!("focus") } } #[derive(thiserror::Error, Debug)] #[allow(missing_docs)] pub enum Yikes { /// Generated by the `#[overseer(..)]` proc-macro #[error(transparent)] Generated(#[from] OrchestraError), } #[derive(Debug, Clone)] pub struct MsgU8(pub u8); #[derive(Debug, Clone)] pub struct MsgU64(pub u64); #[derive(Debug, Clone)] pub struct Msg1029(pub [u8; 1029]);