pub struct Node {
pub id: NodeId,
pub label: Option<String>,
pub attributes: Attributes,
}Expand description
Immutable node input and public node record.
Fields§
§id: NodeIdOpaque external identity.
label: Option<String>Optional Helix node label.
attributes: AttributesSelected immutable properties.
Implementations§
Source§impl Node
impl Node
Sourcepub fn new(id: impl Into<NodeId>) -> Self
pub fn new(id: impl Into<NodeId>) -> Self
Construct a node with no label or selected properties.
Sourcepub fn with_label(self, label: impl Into<String>) -> Self
pub fn with_label(self, label: impl Into<String>) -> Self
Attach a label.
Sourcepub fn with_attributes(self, attributes: Attributes) -> Self
pub fn with_attributes(self, attributes: Attributes) -> Self
Attach selected properties.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Node
impl<'de> Deserialize<'de> for Node
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
impl StructuralPartialEq for Node
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnsafeUnpin for Node
impl UnwindSafe for Node
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