Update phrasing of 'Bin' and 'format' to 'object'
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -10,7 +10,7 @@ use std::{
|
|||||||
pub const MAGIC: u64 = 0xDEAD_BEA7_BA5E_BA11;
|
pub const MAGIC: u64 = 0xDEAD_BEA7_BA5E_BA11;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Bin {
|
pub struct Object {
|
||||||
header: Header,
|
header: Header,
|
||||||
sections: Vec<Box<dyn Section>>,
|
sections: Vec<Box<dyn Section>>,
|
||||||
}
|
}
|
||||||
@@ -108,15 +108,15 @@ impl Section for MetaSection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct BinParser {
|
pub struct ObjectParser {
|
||||||
bytes: Cursor<Vec<u8>>,
|
bytes: Cursor<Vec<u8>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl BinParser {
|
impl ObjectParser {
|
||||||
pub fn parse(&mut self) -> Result<Bin> {
|
pub fn parse(&mut self) -> Result<Object> {
|
||||||
let header = self.parse_header()?;
|
let header = self.parse_header()?;
|
||||||
let sections = self.parse_sections()?;
|
let sections = self.parse_sections()?;
|
||||||
Ok(Bin { header, sections })
|
Ok(Object { header, sections })
|
||||||
}
|
}
|
||||||
|
|
||||||
fn parse_header(&mut self) -> Result<Header> {
|
fn parse_header(&mut self) -> Result<Header> {
|
||||||
|
|||||||
7
vm.md
7
vm.md
@@ -195,9 +195,10 @@ wrapping around to 0.
|
|||||||
* Pop
|
* Pop
|
||||||
* More immediate stores?
|
* More immediate stores?
|
||||||
|
|
||||||
# Binary format
|
# Binary object format
|
||||||
|
|
||||||
The binary format is composed of a header followed by sections that make up the content of the blob.
|
The binary object format is composed of a header followed by sections that make up the content of
|
||||||
|
the object.
|
||||||
|
|
||||||
## Header
|
## Header
|
||||||
|
|
||||||
@@ -213,7 +214,7 @@ Total length: 128 bits
|
|||||||
|
|
||||||
## Sections
|
## Sections
|
||||||
|
|
||||||
The rest of the content is a list of sections. A section's layout is a section header, followed by
|
The rest of the object is a list of sections. A section's layout is a section header, followed by
|
||||||
the section contents.
|
the section contents.
|
||||||
|
|
||||||
### Section header
|
### Section header
|
||||||
|
|||||||
Reference in New Issue
Block a user