pub struct Relation {
pub relation_type: String,
pub id: Value,
pub input: ThingRef,
pub output: ThingRef,
pub data: HashMap<String, Value>,
}Expand description
A database-agnostic graph relation/edge.
This type represents a relationship between two nodes (records) in graph databases like Neo4j and SurrealDB. It contains the relation type, IDs for both endpoints, and optional properties on the relation itself.
Fields§
§relation_type: StringThe relation type (table name in SurrealDB terms)
id: ValueThe relation’s own ID
input: ThingRefThe source node reference (table name + id)
output: ThingRefThe target node reference (table name + id)
data: HashMap<String, Value>Properties on the relation itself
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Relation
impl<'de> Deserialize<'de> for Relation
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 Relation
impl RefUnwindSafe for Relation
impl Send for Relation
impl Sync for Relation
impl Unpin for Relation
impl UnsafeUnpin for Relation
impl UnwindSafe for Relation
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