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 Grid
impl Move for Grid
impl RefUnwindSafe for Grid
impl Send for Grid
impl Sync for Grid
impl Unpin for Grid
impl UnsafeUnpin for Grid
impl UnwindSafe for Grid
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