pub struct GraphNode {
pub entity: String,
pub values: Record,
pub relations: BTreeMap<String, Vec<GraphNode>>,
pub operation: GraphOperation,
pub comment: Option<String>,
}Fields§
§entity: String§values: Record§relations: BTreeMap<String, Vec<GraphNode>>§operation: GraphOperation§comment: Option<String>Annotation comment: carries business intent metadata through graph save. Not persisted to the database — used for observability (SQL logs, audit trails).
Implementations§
Source§impl GraphNode
impl GraphNode
pub fn new(entity: impl Into<String>) -> Self
pub fn operation(self, operation: GraphOperation) -> Self
pub fn reference(self) -> Self
pub fn remove(self) -> Self
pub fn value(self, field: impl Into<String>, value: impl Into<Value>) -> Self
pub fn relation(self, name: impl Into<String>, node: GraphNode) -> Self
pub fn relations( self, name: impl Into<String>, nodes: impl IntoIterator<Item = GraphNode>, ) -> Self
pub fn id(&self) -> Option<&Value>
Sourcepub fn comment(self, comment: impl Into<String>) -> Self
pub fn comment(self, comment: impl Into<String>) -> Self
Set an annotation comment on this graph node. The comment propagates through the graph save process for observability.
Sourcepub fn set_comment(&mut self, comment: impl Into<String>)
pub fn set_comment(&mut self, comment: impl Into<String>)
Set an annotation comment by mutable reference.
Trait Implementations§
impl StructuralPartialEq for GraphNode
Auto Trait Implementations§
impl Freeze for GraphNode
impl RefUnwindSafe for GraphNode
impl Send for GraphNode
impl Sync for GraphNode
impl Unpin for GraphNode
impl UnsafeUnpin for GraphNode
impl UnwindSafe for GraphNode
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