scuffle_bootstrap/
config.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
pub trait ConfigParser: Sized {
	fn parse() -> impl std::future::Future<Output = anyhow::Result<Self>>;
}

impl ConfigParser for () {
	#[inline(always)]
	fn parse() -> impl std::future::Future<Output = anyhow::Result<Self>> {
		std::future::ready(Ok(()))
	}
}

pub struct EmptyConfig;

impl ConfigParser for EmptyConfig {
	#[inline(always)]
	fn parse() -> impl std::future::Future<Output = anyhow::Result<Self>> {
		std::future::ready(Ok(EmptyConfig))
	}
}