Struct gds::Record [] [src]

pub struct Record {
    pub size: u16,
    pub rec_type: u8,
    pub data_type: u8,
    pub data: Vec<RecordData>,
}

A structure describing a data record in a GDS file.

This type should normally not used manually as the gds file can be read in automatically into a Library object.

Fields

Size of the record in bytes (including the header).

Type of the record (see gds::constants).

Type of data.

  • 0 - no data
  • 1 - 16 bits containing flags
  • 2 - 16 bit signed integer
  • 3 - 32 bit signed integer
  • 4 - 32 bit real
  • 5 - 64 bit real
  • 6 - String

Vector of data.

Methods

impl Record
[src]

Creates new record object from given type and data.

The record will be constructed using the given record type rec_type, the data type data_type and a vector of RecordData objects data. The size is calculated automatically.

Creates new record object with no data.

The resulting record will be of the type described by rec_type (see also gds::constants).

Creates new record object containing a single RecordData object.

The record will be constructed using the given record type rec_type, the data type data_type and a single RecordData object data. The size is calculated automatically.

Pushes new data to record.

The data is be pushed to the records data vector and the size is recalculated.

Calculates new size.

This function calculates the current size of the record data. This function is called automatically so that manually invoking is not necessary.

Read record from file specified by file.

Write contents of the record to the file specified by file.

Trait Implementations

impl Debug for Record
[src]

Formats the value using the given formatter.