[][src]Enum ihex::Record

pub enum Record {
    Data {
        offset: u16,
        value: Vec<u8>,
    },
    EndOfFile,
    ExtendedSegmentAddress(u16),
    StartSegmentAddress {
        cs: u16,
        ip: u16,
    },
    ExtendedLinearAddress(u16),
    StartLinearAddress(u32),
}

Variants

Data

Specifies a 16-bit offset address and up to 255 bytes of data. Availability: I8HEX, I16HEX and I32HEX.

Fields of Data

offset: u16

The offset of the data record in memory.

value: Vec<u8>

Up to 255 bytes of data to be written to memory.

EndOfFile

Indicates the end of the object file. Must occur exactly once per file, at the end. Availability: I8HEX, I16HEX and I32HEX.

ExtendedSegmentAddress(u16)

Specifies bits 4-19 of the Segment Base Address (SBA) to address up to 1MiB. Availability: I16HEX.

StartSegmentAddress

Specifies the 20-bit segment address via the CS and IP registers. Availability: I16HEX.

Fields of StartSegmentAddress

cs: u16

Value of the CS register.

ip: u16

Value of the IP register.

ExtendedLinearAddress(u16)

Specifies the upper 16 bits of a 32-bit linear address. The lower 16 bits are derived from the Data record load offset. Availability: I32HEX.

StartLinearAddress(u32)

Specifies the execution start address for the object file. This is the 32-bit linear address for register EIP. Availability: I32HEX.

Implementations

impl Record[src]

pub fn from_record_string(string: &str) -> Result<Self, ReaderError>[src]

Constructs a new Record by parsing string.

Examples

use ihex::Record;

let record = Record::from_record_string(":00000001FF").unwrap();

impl Record[src]

pub fn record_type(&self) -> u8[src]

The record type specifier corresponding to the receiver.

impl Record[src]

pub fn to_record_string(&self) -> Result<String, WriterError>[src]

Returns the IHEX record representation of the receiver, or an error on failure.

Trait Implementations

impl Clone for Record[src]

impl Debug for Record[src]

impl Eq for Record[src]

impl FromStr for Record[src]

type Err = ReaderError

The associated error which can be returned from parsing.

impl Hash for Record[src]

impl PartialEq<Record> for Record[src]

impl StructuralEq for Record[src]

impl StructuralPartialEq for Record[src]

Auto Trait Implementations

impl RefUnwindSafe for Record

impl Send for Record

impl Sync for Record

impl Unpin for Record

impl UnwindSafe for Record

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.