diff --git a/src/caps.rs b/src/caps.rs index 73c79378..419e72cc 100644 --- a/src/caps.rs +++ b/src/caps.rs @@ -71,6 +71,17 @@ impl From for Element { } } +impl Caps { + /// Create a Caps element from its node and hash. + pub fn new>(node: N, hash: Hash) -> Caps { + Caps { + ext: None, + node: node.into(), + hash, + } + } +} + fn compute_item(field: &str) -> Vec { let mut bytes = field.as_bytes().to_vec(); bytes.push(b'<');