pub struct HeteroEdgeType {
pub source_type: String,
pub relation: String,
pub destination_type: String,
}Expand description
Describes a typed, directed edge as a (source_type, relation, destination_type) triple.
This mirrors the canonical form used in heterogeneous GNN literature (HAN, HGT, etc.) and knowledge-graph reasoning.
§Example
use scirs2_graph::heterogeneous::HeteroEdgeType;
let et = HeteroEdgeType::new("user", "rates", "item");
assert_eq!(et.relation, "rates");Fields§
§source_type: StringEntity type of the source node.
relation: StringName of the relation.
destination_type: StringEntity type of the destination node.
Implementations§
Trait Implementations§
Source§impl Clone for HeteroEdgeType
impl Clone for HeteroEdgeType
Source§fn clone(&self) -> HeteroEdgeType
fn clone(&self) -> HeteroEdgeType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HeteroEdgeType
impl Debug for HeteroEdgeType
Source§impl Display for HeteroEdgeType
impl Display for HeteroEdgeType
Source§impl Hash for HeteroEdgeType
impl Hash for HeteroEdgeType
Source§impl PartialEq for HeteroEdgeType
impl PartialEq for HeteroEdgeType
Source§fn eq(&self, other: &HeteroEdgeType) -> bool
fn eq(&self, other: &HeteroEdgeType) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for HeteroEdgeType
impl StructuralPartialEq for HeteroEdgeType
Auto Trait Implementations§
impl Freeze for HeteroEdgeType
impl RefUnwindSafe for HeteroEdgeType
impl Send for HeteroEdgeType
impl Sync for HeteroEdgeType
impl Unpin for HeteroEdgeType
impl UnsafeUnpin for HeteroEdgeType
impl UnwindSafe for HeteroEdgeType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more