#[macro_use]
extern crate nom;

pub mod metadata;
mod frame;
mod utility;

use metadata::metadata_parser;

pub struct Stream {
  pub info: metadata::StreamInfo,
  pub metadata: Vec<metadata::Block>,
  pub frames: Vec<frame::Frame>
}

named!(stream <&[u8], Stream>,
  chain!(
    blocks: metadata_parser ~
    move|| {
      Stream {
        info: blocks.0,
        metadata: blocks.1,
      }
    }
  )
);

#[macro_use]
extern crate nom;

pub mod metadata;
mod frame;
mod utility;

use metadata::metadata_parser;

pub struct Stream {
  pub info: metadata::StreamInfo,
  pub metadata: Vec<metadata::Block>,
  pub frames: Vec<frame::Frame>
}

named!(stream <&[u8], Stream>,
  chain!(
    metadata: metadata_parser,
    || {
      Stream {
        metadata: metadata,
      }
    }
  )
);

--- 
+++ 
@@ -15,11 +15,10 @@
 
 named!(stream <&[u8], Stream>,
   chain!(
-    blocks: metadata_parser ~
-    move|| {
+    metadata: metadata_parser,
+    || {
       Stream {
-        info: blocks.0,
-        metadata: blocks.1,
+        metadata: metadata,
       }
     }
   )
Add info and metadata to `Stream` struct
