pub struct Layout {
pub id: String,
pub name: String,
pub kind: &'static str,
pub flip_y: bool,
pub nodes: BTreeMap<usize, (f64, f64)>,
pub edges: BTreeMap<usize, Vec<(f64, f64)>>,
pub sizes: BTreeMap<usize, (f64, f64)>,
pub unit: Option<f64>,
pub tracks: BTreeMap<usize, i32>,
}Expand description
Positions of nodes and routes of edges, in one diagram (DL) or one coordinate system (GL), as the data writes them.
Fields§
§id: String§name: String§kind: &'static strdiagram (x right, y as flip_y says) or geographic (x longitude,
y latitude, in degrees).
flip_y: boolA diagram whose y grows upwards (OrientationKind.positive).
nodes: BTreeMap<usize, (f64, f64)>Node index → position.
edges: BTreeMap<usize, Vec<(f64, f64)>>Edge index → its route, from its source’s end to its target’s.
sizes: BTreeMap<usize, (f64, f64)>Node index → its width and height, where the layout sizes it (a busbar, as long as the bays it joins).
unit: Option<f64>Pixels per unit, where the positions are to be drawn as they are;
None, to be scaled to fit.
tracks: BTreeMap<usize, i32>Edge index → how many line spacings aside it runs from its route, to the left of its way (negative: right); the views space them in pixels.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Layout
impl Freeze for Layoutwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
&'static str: Freeze,
*const LeafNode<usize, (f64, f64)> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(usize, (f64, f64))>>: Freeze,
*const LeafNode<usize, Vec<(f64, f64)>> is !null: Freeze,
PhantomData<Box<(usize, Vec<(f64, f64)>)>>: Freeze,
*const LeafNode<usize, i32> is !null: Freeze,
PhantomData<Box<(usize, i32)>>: Freeze,
impl Move for Layout
impl RefUnwindSafe for Layout
impl Send for Layoutwhere
RawVecInner: Send,
&'static str: Send,
NodeRef<Owned, usize, (f64, f64), LeafOrInternal>: Send,
BoxRaw<(usize, (f64, f64))>: Send,
NodeRef<Owned, usize, Vec<(f64, f64)>, LeafOrInternal>: Send,
BoxRaw<(usize, Vec<(f64, f64)>)>: Send,
NodeRef<Owned, usize, i32, LeafOrInternal>: Send,
BoxRaw<(usize, i32)>: Send,
impl Sync for Layout
impl Unpin for Layoutwhere
*const u8 is !null: Unpin,
&'static str: Unpin,
*const LeafNode<usize, (f64, f64)> is !null: Unpin,
Box<(usize, (f64, f64))>: Unpin,
*const LeafNode<usize, Vec<(f64, f64)>> is !null: Unpin,
Box<(usize, Vec<(f64, f64)>)>: Unpin,
*const LeafNode<usize, i32> is !null: Unpin,
Box<(usize, i32)>: Unpin,
impl UnsafeUnpin for Layoutwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
&'static str: UnsafeUnpin,
*const LeafNode<usize, (f64, f64)> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(usize, (f64, f64))>>: UnsafeUnpin,
*const LeafNode<usize, Vec<(f64, f64)>> is !null: UnsafeUnpin,
PhantomData<Box<(usize, Vec<(f64, f64)>)>>: UnsafeUnpin,
*const LeafNode<usize, i32> is !null: UnsafeUnpin,
PhantomData<Box<(usize, i32)>>: UnsafeUnpin,
impl UnwindSafe for Layoutwhere
RawVecInner: UnwindSafe,
&'static str: UnwindSafe,
BTreeMap<usize, (f64, f64)>: UnwindSafe,
BTreeMap<usize, Vec<(f64, f64)>>: UnwindSafe,
BTreeMap<usize, i32>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more