libreda_db/layout/
types.rs

1// Copyright (c) 2020-2021 Thomas Kramer.
2// SPDX-FileCopyrightText: 2022 Thomas Kramer
3//
4// SPDX-License-Identifier: AGPL-3.0-or-later
5
6//! Data types used in the data base.
7
8/// Default unsigned integer type.
9pub type UInt = u32;
10/// Default signed integer type.
11pub type SInt = i32;
12
13/// Integer coordinate type.
14pub type Coord = i32;
15
16/// Meta-data of a layer.
17#[derive(Clone, Hash, PartialEq, Debug)]
18#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19pub struct LayerInfo<NameType> {
20    /// Identifier of the layer.
21    pub index: UInt,
22    /// Identifier of the layer.
23    pub datatype: UInt,
24    /// Name of the layer.
25    pub name: Option<NameType>,
26}