mirror of https://codeberg.org/topola/topola.git
layout: inherit `GetLayer` via enum_dispatch macro
This commit is contained in:
parent
45593c9e7a
commit
9730ff215e
|
|
@ -41,7 +41,7 @@ impl TryFrom<GeometryIndex> for BendIndex {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[enum_dispatch(GetOffset, SetOffset, GetWidth)]
|
#[enum_dispatch(GetOffset, SetOffset, GetWidth, GetLayer)]
|
||||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||||
pub enum BendWeight {
|
pub enum BendWeight {
|
||||||
Fixed(FixedBendWeight),
|
Fixed(FixedBendWeight),
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ impl TryFrom<GeometryIndex> for DotIndex {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[enum_dispatch(GetPos, SetPos, GetWidth)]
|
#[enum_dispatch(GetPos, SetPos, GetWidth, GetLayer)]
|
||||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||||
pub enum DotWeight {
|
pub enum DotWeight {
|
||||||
Fixed(FixedDotWeight),
|
Fixed(FixedDotWeight),
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ pub enum GeometryIndex {
|
||||||
LooseBend(LooseBendIndex),
|
LooseBend(LooseBendIndex),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[enum_dispatch(GetWidth, Retag<GeometryIndex>)]
|
#[enum_dispatch(GetWidth, GetLayer, Retag<GeometryIndex>)]
|
||||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||||
pub enum GeometryWeight {
|
pub enum GeometryWeight {
|
||||||
FixedDot(FixedDotWeight),
|
FixedDot(FixedDotWeight),
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ impl TryFrom<GeometryIndex> for SegIndex {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[enum_dispatch(GetWidth)]
|
#[enum_dispatch(GetWidth, GetLayer)]
|
||||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||||
pub enum SegWeight {
|
pub enum SegWeight {
|
||||||
Fixed(FixedSegWeight),
|
Fixed(FixedSegWeight),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue