Trait LayoutIds

Source
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§

Source

type Coord: CoordinateType + Debug + Display + Hash + 'static + Send + Sync

Number type used for coordinates and distances.

Source

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 i32 is a good choice for coordinates. However, computing areas in i32 might easily lead to overflows. Hence a 64-bit integer type might be a better choice.
Source

type LayerId: IdType

Layer identifier type.

Source

type ShapeId: IdType

Shape identifier type.

Implementations on Foreign Types§

Source§

impl<T> LayoutIds for &T
where T: LayoutIds,

Source§

impl<T> LayoutIds for &mut T
where T: LayoutIds,

Source§

impl<T> LayoutIds for Box<T>
where T: LayoutIds,

Source§

impl<T> LayoutIds for Rc<T>
where T: LayoutIds,

Source§

impl<T> LayoutIds for Arc<T>
where T: LayoutIds,

Implementors§