Parse #[env] attribute and representing it in meta types

This commit is contained in:
Lukas Kalbertodt
2021-07-25 11:36:36 +02:00
parent 3c7376035c
commit db2aebc270
5 changed files with 114 additions and 34 deletions

View File

@@ -15,6 +15,7 @@ struct Conf {
#[derive(Debug, Config)]
struct Http {
/// The port the server will listen on.
#[config(env = "PORT")]
port: u16,
/// The bind address of the server. Can be set to `0.0.0.0` for example, to