Enum beam_file::chunk::StandardChunk
[−]
[src]
pub enum StandardChunk {
Atom(AtomChunk),
Code(CodeChunk),
StrT(StrTChunk),
ImpT(ImpTChunk),
ExpT(ExpTChunk),
LitT(LitTChunk),
LocT(LocTChunk),
FunT(FunTChunk),
Attr(AttrChunk),
CInf(CInfChunk),
Abst(AbstChunk),
Unknown(RawChunk),
}A representation of commonly used chunk.
use beam_file::BeamFile; use beam_file::chunk::{Chunk, StandardChunk}; let beam = BeamFile::<StandardChunk>::from_file("tests/testdata/test.beam").unwrap(); assert_eq!(b"Atom", beam.chunks.iter().nth(0).map(|c| c.id()).unwrap());
Variants
Atom(AtomChunk)Code(CodeChunk)StrT(StrTChunk)ImpT(ImpTChunk)ExpT(ExpTChunk)LitT(LitTChunk)LocT(LocTChunk)FunT(FunTChunk)Attr(AttrChunk)CInf(CInfChunk)Abst(AbstChunk)Unknown(RawChunk)Trait Implementations
impl Debug for StandardChunk[src]
impl PartialEq for StandardChunk[src]
fn eq(&self, __arg_0: &StandardChunk) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &StandardChunk) -> bool
This method tests for !=.
impl Eq for StandardChunk[src]
impl Chunk for StandardChunk[src]
fn id(&self) -> &Id
Returns the identifier of the chunk.
fn decode_data<R: Read>(id: &Id, reader: R) -> Result<Self> where
Self: Sized,
Self: Sized,
Reads a chunk which has the identifier id from reader. Read more
fn encode_data<W: Write>(&self, writer: W) -> Result<()>
Writes the data of the chunk to writer. Read more
fn decode<R: Read>(reader: R) -> Result<Self> where
Self: Sized,
Self: Sized,
Reads a chunk from reader.
fn encode<W: Write>(&self, writer: W) -> Result<()>
Writes the chunk to writer.