pub struct GdsLibrary {Show 13 fields
pub name: String,
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
§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>}* ENDLIBFields§
§name: StringLibrary Name
version: i16Gds Spec Version
dates: GdsDateTimes§units: GdsUnitsSpatial Units
structs: Vec<GdsStruct>Struct Definitions
libdirsize: Unsupported§srfname: Unsupported§libsecur: Unsupported§reflibs: Unsupported§fonts: Unsupported§attrtable: Unsupported§generations: Unsupported§format_type: UnsupportedImplementations§
Source§impl GdsLibrary
impl GdsLibrary
Sourcepub fn new(name: impl Into<String>) -> Self
pub fn new(name: impl Into<String>) -> Self
Create a new and empty GdsLibrary
Sourcepub fn load(fname: impl AsRef<Path>) -> GdsResult<GdsLibrary>
pub fn load(fname: impl AsRef<Path>) -> GdsResult<GdsLibrary>
Read 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>
Read 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
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GdsLibrary
impl Debug for GdsLibrary
Source§impl Default for GdsLibrary
impl Default for GdsLibrary
Source§fn default() -> GdsLibrary
fn default() -> GdsLibrary
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for GdsLibrary
impl<'de> Deserialize<'de> for GdsLibrary
Source§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
Source§impl PartialEq for GdsLibrary
impl PartialEq for GdsLibrary
Source§impl SerdeFile for GdsLibrary
impl SerdeFile for GdsLibrary
Source§impl Serialize for GdsLibrary
impl Serialize for GdsLibrary
impl StructuralPartialEq for GdsLibrary
Auto Trait Implementations§
impl Freeze for GdsLibrary
impl RefUnwindSafe for GdsLibrary
impl Send for GdsLibrary
impl Sync for GdsLibrary
impl Unpin for GdsLibrary
impl UnwindSafe for GdsLibrary
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more