mirror of https://codeberg.org/topola/topola.git
refactor(geometry): SetOffset should inherit from GetOffset
This commit is contained in:
parent
699bd58949
commit
a67f8ea052
|
|
@ -48,7 +48,7 @@ pub trait GetOffset {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[enum_dispatch]
|
#[enum_dispatch]
|
||||||
pub trait SetOffset {
|
pub trait SetOffset: GetOffset {
|
||||||
fn set_offset(&mut self, offset: f64);
|
fn set_offset(&mut self, offset: f64);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -68,7 +68,7 @@ pub enum GenericNode<P, C> {
|
||||||
|
|
||||||
pub trait AccessDotWeight<PW>: GetSetPos + GetWidth + Into<PW> + Copy {}
|
pub trait AccessDotWeight<PW>: GetSetPos + GetWidth + Into<PW> + Copy {}
|
||||||
pub trait AccessSegWeight<PW>: GetWidth + Into<PW> + Copy {}
|
pub trait AccessSegWeight<PW>: GetWidth + Into<PW> + Copy {}
|
||||||
pub trait AccessBendWeight<PW>: GetOffset + SetOffset + GetWidth + Into<PW> + Copy {}
|
pub trait AccessBendWeight<PW>: SetOffset + GetWidth + Into<PW> + Copy {}
|
||||||
|
|
||||||
#[derive(Debug, Getters)]
|
#[derive(Debug, Getters)]
|
||||||
pub struct Geometry<PW, DW, SW, BW, CW, PI, DI, SI, BI> {
|
pub struct Geometry<PW, DW, SW, BW, CW, PI, DI, SI, BI> {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue