Skip to content

Instantly share code, notes, and snippets.

@willemolding
Created October 19, 2021 00:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save willemolding/851137ee10d2471464aad72ac1a16739 to your computer and use it in GitHub Desktop.
Save willemolding/851137ee10d2471464aad72ac1a16739 to your computer and use it in GitHub Desktop.
pub struct Deserializer<R: Read> {
pub rdr: BufReader<R>,
pub layout_iter: BinProtRuleIterator,
}
impl<R: Read> Deserializer<R> {
pub fn from_reader_with_layout(rdr: R, layout: &BinProtRule) -> Self {
Self {
rdr: BufReader::new(rdr),
layout_iter: layout.into_iter(),
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment