chiark / gitweb /
config
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 24 Jul 2021 12:52:36 +0000 (13:52 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 24 Jul 2021 12:52:36 +0000 (13:52 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/config.rs

index 94c5e1620cadc63ddbc7f5ad33ad955ff424f359..830828573b4967baad5760b6421762f5eb3ae3e7 100644 (file)
@@ -29,6 +29,7 @@ impl<'s> Option<&'s str> {
   }
 }
 
+#[derive(Clone)]
 pub struct Secret(pub String);
 impl Parseable for Secret {
   #[throws(AE)]
@@ -46,6 +47,7 @@ impl Debug for Secret {
 }
 
 #[derive(hippotat_macros::ResolveConfig)]
+#[derive(Debug,Clone)]
 pub struct InstanceConfig {
   // Exceptional settings
   #[special(special_server, SKL::ServerName)] pub server: ServerName,
@@ -522,4 +524,9 @@ pub fn read() {
     ],
     special_server_section: SN::special_server_section(),
   };
+
+  let ic = InstanceConfig::resolve_instance(&rctx)
+    .context("resolve config xxx for")?;
+
+  eprintln!("{:?}", &ic);
 }