pub struct GdsLibrary {Show 13 fields
pub name: ArcStr,
pub version: i16,
pub dates: GdsDateTimes,
pub units: GdsUnits,
pub structs: Vec<GdsStruct>,
pub libdirsize: Unsupported,
pub srfname: Unsupported,
pub libsecur: Unsupported,
pub reflibs: Unsupported,
pub fonts: Unsupported,
pub attrtable: Unsupported,
pub generations: Unsupported,
pub format_type: Unsupported,
}
Expand description
A GDS library.
The Library is GDSII’s primary idiom for a suite of layout-cells.
A Library generally corresponds one-to-one with a .gds
file.
Libraries consist primarily of cell-definitions (GdsStructs),
and secondarily include library-level meta-data, including the distance units, GDS-spec version, and modification dates.
Several more esoteric library-level GDSII features are included as GdsLibrary fields, but are not materially supported. The empty Unsupported value generally denotes these fields.
Spec BNF:
HEADER BGNLIB [LIBDIRSIZE] [SRFNAME] [LIBSECUR] LIBNAME [REFLIBS] [FONTS] [ATTRTABLE] [GENERATIONS] [<FormatType>]
UNITS {<structure>}* ENDLIB
Fields§
§name: ArcStr
Library name.
version: i16
Gds spec version.
dates: GdsDateTimes
Modification date(s).
units: GdsUnits
Spatial units.
structs: Vec<GdsStruct>
Struct definitions.
libdirsize: Unsupported
§srfname: Unsupported
§libsecur: Unsupported
§reflibs: Unsupported
§fonts: Unsupported
§attrtable: Unsupported
§generations: Unsupported
§format_type: Unsupported
Implementations§
Source§impl GdsLibrary
impl GdsLibrary
Sourcepub fn new(name: impl Into<ArcStr>) -> Self
pub fn new(name: impl Into<ArcStr>) -> Self
Creates a new and empty GdsLibrary.
Sourcepub fn with_units(name: impl Into<ArcStr>, units: GdsUnits) -> Self
pub fn with_units(name: impl Into<ArcStr>, units: GdsUnits) -> Self
Creates a new and empty GdsLibrary with the given units.
Sourcepub fn load(fname: impl AsRef<Path>) -> GdsResult<GdsLibrary>
pub fn load(fname: impl AsRef<Path>) -> GdsResult<GdsLibrary>
Reads a GDS loaded from file at path fname
.
Sourcepub fn from_bytes(bytes: Vec<u8>) -> GdsResult<GdsLibrary>
pub fn from_bytes(bytes: Vec<u8>) -> GdsResult<GdsLibrary>
Reads a GdsLibrary from byte-vector bytes
.
Trait Implementations§
Source§impl Clone for GdsLibrary
impl Clone for GdsLibrary
Source§fn clone(&self) -> GdsLibrary
fn clone(&self) -> GdsLibrary
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more