pub struct Grid {
pub nodes: Vec<Node>,
pub edges: Vec<Edge>,
pub elsewhere: Counts,
pub layouts: Vec<Layout>,
pub auto: Option<Layout>,
pub inside: FastMap<usize, Inside>,
/* private fields */
}Fields§
§nodes: Vec<Node>§edges: Vec<Edge>§elsewhere: CountsFindings on objects with no node or edge (headers, regions, …).
layouts: Vec<Layout>Positions from the DL diagrams and GL coordinate systems.
auto: Option<Layout>Positions laid out here (crate::layout::force), for the view’s
automatic layout: the view’s own is quadratic, and this one is the
same each time.
inside: FastMap<usize, Inside>What each substation holds, by node index.
Implementations§
Source§impl Grid
impl Grid
Sourcepub fn add_findings(&mut self, violations: &[(Option<usize>, Violation)])
pub fn add_findings(&mut self, violations: &[(Option<usize>, Violation)])
Count each finding on its object’s node or edge.
Sourcepub fn reveal(&self, id: &str) -> Option<Value>
pub fn reveal(&self, id: &str) -> Option<Value>
Where the view shows object id: select, the node or edge it is
on, else the item it stands for inside enter, its substation; and
inside, a substation’s own id. None if it is on neither.
Sourcepub fn json(&self, set: &impl Locations) -> Value
pub fn json(&self, set: &impl Locations) -> Value
The view’s data: nodes and edges, each with where it is written.
Sourcepub fn inside_of(&self, id: &str) -> Option<&Inside>
pub fn inside_of(&self, id: &str) -> Option<&Inside>
What the substation id holds; None if no substation of the set
has that mRID.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Grid
impl Freeze for Gridwhere
*const u8 is !null: Freeze,
PhantomData<Node>: Freeze,
PhantomData<Edge>: Freeze,
PhantomData<fn() -> FastHasher>: Freeze,
PhantomData<(String, Place)>: Freeze,
PhantomData<Layout>: 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,
PhantomData<(usize, Inside)>: Freeze,
PhantomData<(String, (usize, usize))>: Freeze,
PhantomData<(String, ())>: Freeze,
impl Move for Grid
impl RefUnwindSafe for Grid
impl Send for Gridwhere
RawVecInner: Send,
&'static str: Send,
NodeRef<Owned, &'static str, usize, LeafOrInternal>: Send,
BoxRaw<(&'static str, usize)>: Send,
RawTable<(String, Place)>: 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,
RawTable<(usize, Inside)>: Send,
RawTable<(String, (usize, usize))>: Send,
RawTable<(String, ())>: Send,
impl Sync for Gridwhere
RawVecInner: Sync,
NodeRef<Owned, &'static str, usize, LeafOrInternal>: Sync,
BoxRaw<(&'static str, usize)>: Sync,
RawTable<(String, Place)>: Sync,
NodeRef<Owned, usize, (f64, f64), LeafOrInternal>: Sync,
BoxRaw<(usize, (f64, f64))>: Sync,
NodeRef<Owned, usize, Vec<(f64, f64)>, LeafOrInternal>: Sync,
BoxRaw<(usize, Vec<(f64, f64)>)>: Sync,
NodeRef<Owned, usize, i32, LeafOrInternal>: Sync,
BoxRaw<(usize, i32)>: Sync,
RawTable<(usize, Inside)>: Sync,
RawTable<(String, (usize, usize))>: Sync,
RawTable<(String, ())>: Sync,
impl Unpin for Gridwhere
*const u8 is !null: Unpin,
&'static str: Unpin,
*const LeafNode<&'static str, usize> is !null: Unpin,
Box<(&'static str, usize)>: 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 Gridwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<Node>: UnsafeUnpin,
PhantomData<Edge>: UnsafeUnpin,
PhantomData<fn() -> FastHasher>: UnsafeUnpin,
PhantomData<(String, Place)>: UnsafeUnpin,
PhantomData<Layout>: 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,
PhantomData<(usize, Inside)>: UnsafeUnpin,
PhantomData<(String, (usize, usize))>: UnsafeUnpin,
PhantomData<(String, ())>: UnsafeUnpin,
impl UnwindSafe for Gridwhere
RawVecInner: UnwindSafe,
&'static str: UnwindSafe,
BTreeMap<&'static str, usize>: UnwindSafe,
HashMap<String, Place, BuildHasherDefault<FastHasher>>: UnwindSafe,
BTreeMap<usize, (f64, f64)>: UnwindSafe,
BTreeMap<usize, Vec<(f64, f64)>>: UnwindSafe,
BTreeMap<usize, i32>: UnwindSafe,
HashMap<usize, Inside, BuildHasherDefault<FastHasher>>: UnwindSafe,
HashMap<String, (usize, usize), BuildHasherDefault<FastHasher>>: UnwindSafe,
NonNull<u8>: 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