pub trait LayoutIds: HierarchyIds {
type Coord: CoordinateType + Debug + Display + Hash + 'static + Send + Sync;
type Area: Num + Copy + PartialOrd + From<Self::Coord> + 'static + Send + Sync;
type LayerId: IdType;
type ShapeId: IdType;
}Expand description
Define ID types used in layouts.
Required Associated Types§
Sourcetype Coord: CoordinateType + Debug + Display + Hash + 'static + Send + Sync
type Coord: CoordinateType + Debug + Display + Hash + 'static + Send + Sync
Number type used for coordinates and distances.
Sourcetype Area: Num + Copy + PartialOrd + From<Self::Coord> + 'static + Send + Sync
type Area: Num + Copy + PartialOrd + From<Self::Coord> + 'static + Send + Sync
Number type for areas.
This is possibly another type then Coord for the following reasons:
- Distances and areas are semantically different.
- In practice
i32is a good choice for coordinates. However, computing areas ini32might easily lead to overflows. Hence a 64-bit integer type might be a better choice.