pub struct NodeVal { /* private fields */ }
Expand description
NodeVal represents a node in the graph and stores the nodeID, label and properties of that node.
Implementations§
source§impl NodeVal
impl NodeVal
pub fn new<I: Into<InternalID>, S: Into<String>>(id: I, label: S) -> Self
pub fn get_node_id(&self) -> &InternalID
pub fn get_label_name(&self) -> &String
sourcepub fn add_property<S: Into<String>, V: Into<Value>>(
&mut self,
key: S,
value: V
)
pub fn add_property<S: Into<String>, V: Into<Value>>( &mut self, key: S, value: V )
Adds a property with the given key/value pair to the NodeVal
§Arguments
key
: The name of the propertyvalue
: The value of the property
sourcepub fn get_properties(&self) -> &Vec<(String, Value)>
pub fn get_properties(&self) -> &Vec<(String, Value)>
Returns all properties of the NodeVal
Trait Implementations§
source§impl PartialEq for NodeVal
impl PartialEq for NodeVal
impl StructuralPartialEq for NodeVal
Auto Trait Implementations§
impl Freeze for NodeVal
impl RefUnwindSafe for NodeVal
impl Send for NodeVal
impl Sync for NodeVal
impl Unpin for NodeVal
impl UnwindSafe for NodeVal
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