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