Enum gcd::RecordHeader [−][src]
pub enum RecordHeader {
Checksum,
Filler(u16),
MainHeader(u16),
Text(u16),
DescriptorType(u16),
DescriptorData(u16),
End,
Unknown {
id: u16,
len: u16,
},
}
Expand description
Known Record Headers, based on the current knowledge.
Variants
A one byte record that, if read, result in a 0 checksum.
Filler(u16)
A 0-0xFFFF record with nothing but zeros, usually lining the next record address.
Tuple Fields of Filler
0: u16
MainHeader(u16)
Only two variations are known, a HWID and a PartNumber. Possibly describing the file format itself.
Tuple Fields of MainHeader
0: u16
Text(u16)
Arbitrary data, usually containing valid ASCII text, mostly one line.
Tuple Fields of Text
0: u16
DescriptorType(u16)
Data information about the firmware, contains only the type.
This will be later combine with DescriptorData
Tuple Fields of DescriptorType
0: u16
DescriptorData(u16)
Data information about the firmware, contain only the data.
Need to be combined with DescriptorType to be interpreted.
Tuple Fields of DescriptorData
0: u16
Mark the end of the file. Can only be the last header.
Header with Unknown ID, can be a Firmware block, if the ID is described on the Descriptor header, or Unknown/Undefined Record.
Implementations
Return the len from the Header, obs: not the len of the Header itself
Create a header using the id and len values.
Create the Header using raw bytes
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for RecordHeader
impl Send for RecordHeader
impl Sync for RecordHeader
impl Unpin for RecordHeader
impl UnwindSafe for RecordHeader
Blanket Implementations
Mutably borrows from an owned value. Read more