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

Checksum

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
End

Mark the end of the file. Can only be the last header.

Unknown

Header with Unknown ID, can be a Firmware block, if the ID is described on the Descriptor header, or Unknown/Undefined Record.

Fields of Unknown

id: u16len: u16

Implementations

Return the id from the Header

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

Write the Header to the raw byte buffer.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.