pub struct GraphEdge {
pub source_id: String,
pub target_id: String,
pub relationship_name: String,
pub properties: HashMap<Cow<'static, str>, Value>,
}Expand description
Structured graph edge for easier construction
Fields§
§source_id: StringSource node ID
target_id: StringTarget node ID
relationship_name: StringRelationship name (edge label)
properties: HashMap<Cow<'static, str>, Value>Edge properties
Implementations§
Source§impl GraphEdge
impl GraphEdge
Sourcepub fn new(
source_id: String,
target_id: String,
relationship_name: String,
) -> Self
pub fn new( source_id: String, target_id: String, relationship_name: String, ) -> Self
Create a new graph edge
Sourcepub fn with_properties(
source_id: String,
target_id: String,
relationship_name: String,
properties: HashMap<Cow<'static, str>, Value>,
) -> Self
pub fn with_properties( source_id: String, target_id: String, relationship_name: String, properties: HashMap<Cow<'static, str>, Value>, ) -> Self
Create a new graph edge with properties
Sourcepub fn to_edge_data(self) -> EdgeData
pub fn to_edge_data(self) -> EdgeData
Convert to EdgeData tuple
Sourcepub fn from_edge_data(edge: EdgeData) -> Self
pub fn from_edge_data(edge: EdgeData) -> Self
Create from EdgeData tuple
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GraphEdge
impl<'de> Deserialize<'de> for GraphEdge
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 GraphEdge
impl RefUnwindSafe for GraphEdge
impl Send for GraphEdge
impl Sync for GraphEdge
impl Unpin for GraphEdge
impl UnsafeUnpin for GraphEdge
impl UnwindSafe for GraphEdge
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