tray_wrapper/server_generator.rs
1//! This the types needed to conform to in order to
2//! have the wrapper execute your server.
3
4use std::{pin::Pin, sync::Arc};
5
6pub enum ContinueRunning {
7 Continue,
8 Exit,
9 ExitWithError(String),
10}
11
12pub type ServerGeneratorResult = Pin<Box<dyn Future<Output = ContinueRunning> + Send>>;
13
14pub type ServerGenerator = Arc<dyn Fn() -> ServerGeneratorResult + Send + Sync>;