pub fn decode_naked<TermBuilderT: ITermBuilder>(
  r: &mut BinaryReader, tb: &mut TermBuilderT)
  -> Hopefully<TermBuilderT::TermT>
{
  let term_tag = r.read_u8();
  match term_tag {
    x if x == Tag::List as u8 =>
      decode_list::<TermBuilderT>(r, tb),

    x if x == Tag::String as u8 =>
      decode_string::<TermBuilderT>(r, tb),

    x if x == Tag::AtomDeprecated as u8 =>
      decode_atom_latin1::<TermBuilderT>(r, tb),

    x if x == Tag::SmallInteger as u8 =>
      decode_u8::<TermBuilderT>(r, tb),

    x if x == Tag::Integer as u8 =>
      decode_s32::<TermBuilderT>(r, tb),

    x if x == Tag::Nil as u8 => Ok(tb.create_nil()),

    x if x == Tag::LargeTuple as u8 => {
      let size = r.read_u32be() as Word;
      decode_tuple::<TermBuilderT>(r, size, tb)
    }

    x if x == Tag::SmallTuple as u8 => {
      let size = r.read_u8() as Word;
      decode_tuple::<TermBuilderT>(r, size, tb)
    }

    x if x == Tag::LargeBig as u8 => {
      let size = r.read_u32be() as Word;
      decode_big::<TermBuilderT>(r, size, tb)
    }

    x if x == Tag::SmallBig as u8 => {
      let size = r.read_u8() as Word;
      decode_big::<TermBuilderT>(r, size, tb)
    }

    x if x == Tag::Binary as u8 =>
      decode_binary::<TermBuilderT>(r, tb),

    _ => {
      let msg = format!(
        "Don't know how to decode ETF value tag 0x{:x} ({})",
        term_tag, term_tag
      );
      fail(msg)
    }
  }
}
/// Given an encoded term without ETF tag (131u8), read the term from `r` and
/// place boxed term parts on heap `heap`.
Given an encoded term without ETF tag (131u8), read the term from `r` and
place boxed term parts on heap `heap`.
Given an encoded term without ETF tag ( 131u8 ) read the term from ` r ` and place boxed term parts on heap ` heap ` .
pub fn decode_naked<TermBuilderT: ITermBuilder>(
  r: &mut BinaryReader, tb: &mut TermBuilderT)
  -> Hopefully<TermBuilderT::TermT>
{
  let term_tag = r.read_u8();
  match term_tag {
    x if x == Tag::List as u8 =>
      decode_list::<TermBuilderT>(r, tb),
    x if x == Tag::String as u8 =>
      decode_string::<TermBuilderT>(r, tb),
    x if x == Tag::AtomDeprecated as u8 =>
      decode_atom_latin1::<TermBuilderT>(r, tb),
    x if x == Tag::SmallInteger as u8 =>
      decode_u8::<TermBuilderT>(r, tb),
    x if x == Tag::Integer as u8 =>
      decode_s32::<TermBuilderT>(r, tb),
    x if x == Tag::Nil as u8 => Ok(tb.create_nil()),
    x if x == Tag::LargeTuple as u8 => {
      let size = r.read_u32be() as Word;
      decode_tuple::<TermBuilderT>(r, size, tb)
    }
    x if x == Tag::SmallTuple as u8 => {
      let size = r.read_u8() as Word;
      decode_tuple::<TermBuilderT>(r, size, tb)
    }
    x if x == Tag::LargeBig as u8 => {
      let size = r.read_u32be() as Word;
      decode_big::<TermBuilderT>(r, size, tb)
    }
    x if x == Tag::SmallBig as u8 => {
      let size = r.read_u8() as Word;
      decode_big::<TermBuilderT>(r, size, tb)
    }
    x if x == Tag::Binary as u8 =>
      decode_binary::<TermBuilderT>(r, tb),
    _ => {
      let msg = format!(
        "Don't know how to decode ETF value tag 0x{:x} ({})",
        term_tag, term_tag
      );
      fail(msg)
    }
  }
}
pub fn decode_naked < TermBuilderT : ITermBuilder > ( r : & mut BinaryReader , tb : & mut TermBuilderT ) -> Hopefully < TermBuilderT :: TermT > { let term_tag = r . read_u8 ( ) ; match term_tag { x if x == Tag :: List as u8 => decode_list :: < TermBuilderT > ( r , tb ) , x if x == Tag :: String as u8 => decode_string :: < TermBuilderT > ( r , tb ) , x if x == Tag :: AtomDeprecated as u8 => decode_atom_latin1 :: < TermBuilderT > ( r , tb ) , x if x == Tag :: SmallInteger as u8 => decode_u8 :: < TermBuilderT > ( r , tb ) , x if x == Tag :: Integer as u8 => decode_s32 :: < TermBuilderT > ( r , tb ) , x if x == Tag :: Nil as u8 => Ok ( tb . create_nil ( ) ) , x if x == Tag :: LargeTuple as u8 => { let size = r . read_u32be ( ) as Word ; decode_tuple :: < TermBuilderT > ( r , size , tb ) } x if x == Tag :: SmallTuple as u8 => { let size = r . read_u8 ( ) as Word ; decode_tuple :: < TermBuilderT > ( r , size , tb ) } x if x == Tag :: LargeBig as u8 => { let size = r . read_u32be ( ) as Word ; decode_big :: < TermBuilderT > ( r , size , tb ) } x if x == Tag :: SmallBig as u8 => { let size = r . read_u8 ( ) as Word ; decode_big :: < TermBuilderT > ( r , size , tb ) } x if x == Tag :: Binary as u8 => decode_binary :: < TermBuilderT > ( r , tb ) , _ => { let msg = format ! ( " " term_tag term_tag ) ; fail ( msg ) } } }
Given an encoded term without ETF tag (131u8), read the term from `r` and
place boxed term parts on heap `heap`.
Given an encoded term without ETF tag ( 131u8 ) read the term from ` r ` and place boxed term parts on heap ` heap ` .
r
&mut BinaryReader
tb
&mut TermBuilderT