From ced43fe83bec919a038a71923e9f636686a626cf Mon Sep 17 00:00:00 2001 From: lummax Date: Thu, 3 Sep 2015 11:16:17 +0200 Subject: [PATCH] format/context: implement `set_metadata()` --- src/format/context/output.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/format/context/output.rs b/src/format/context/output.rs index 2cb576f..080c057 100644 --- a/src/format/context/output.rs +++ b/src/format/context/output.rs @@ -71,6 +71,12 @@ impl Output { StreamMut::wrap(ptr) } } + + pub fn set_metadata(&mut self, dictionary: Dictionary) { + unsafe { + (*self.as_mut_ptr()).metadata = dictionary.take(); + } + } } impl Deref for Output {