pub struct Config {
pub env: HashMap<String, String>,
pub args: Vec<String>,
pub files: Vec<File>,
pub steward: Option<Url>,
}
Expand description
The configuration for an Enarx WASI application
This struct can be used with any serde deserializer.
§Examples
extern crate toml;
use enarx_config::Config;
const CONFIG: &str = r#"
[[files]]
name = "LISTEN"
kind = "listen"
prot = "tls"
port = 12345
"#;
let config: Config = toml::from_str(CONFIG).unwrap();
Fields§
§env: HashMap<String, String>
The environment variables to provide to the application
args: Vec<String>
The arguments to provide to the application
files: Vec<File>
The array of pre-opened file descriptors
steward: Option<Url>
An optional Steward URL
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more