pub struct MachNode {
pub name: String,
pub parent: u32,
pub index: u32,
pub children: Vec<u32>,
pub components: Vec<u32>,
}
Expand description
MachNode. This is where data is referenced/owned as relational to other data. Nodes are meant to be as small as possible. They are used for relationships, not actual data.
Fields§
§name: String
Name of this node - does not have to be unique to the graph.
parent: u32
Parent index within graph. Same as ‘index’ means no parent.
index: u32
Index of this node within graph.
children: Vec<u32>
Children of this node.
components: Vec<u32>
Index of components in data store (not owned by graph).
Implementations§
Source§impl MachNode
Implementation for MachNode.
impl MachNode
Implementation for MachNode.
Sourcepub fn has_parent(&self) -> bool
pub fn has_parent(&self) -> bool
Has parent?
Sourcepub fn has_children(&self) -> bool
pub fn has_children(&self) -> bool
Has children?
Sourcepub fn has_components(&self) -> bool
pub fn has_components(&self) -> bool
Has components?
Sourcepub fn accept_mut(&mut self, visitor: &mut impl Visitor)
pub fn accept_mut(&mut self, visitor: &mut impl Visitor)
Accept a visitor mutable.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MachNode
impl<'de> Deserialize<'de> for MachNode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MachNode
impl RefUnwindSafe for MachNode
impl Send for MachNode
impl Sync for MachNode
impl Unpin for MachNode
impl UnwindSafe for MachNode
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