diff --git a/src/disco.rs b/src/disco.rs index d61cf36..ee673b8 100644 --- a/src/disco.rs +++ b/src/disco.rs @@ -34,6 +34,15 @@ attributes: [ var: String = "var" => required, ]); +impl Feature { + /// Create a new `` with the according `@var`. + pub fn new(var: &str) -> Feature { + Feature { + var: String::from(var) + } + } +} + /// Structure representing an `` element. #[derive(Debug, Clone)] pub struct Identity {