pub struct Edge {
pub id: EdgeId,
pub source: NodeId,
pub target: NodeId,
pub weight: f32,
pub label: Option<String>,
}Expand description
关系边。知识图谱常为有向(A → B),也支持无向整体开关。
Fields§
§id: EdgeId§source: NodeId§target: NodeId§weight: f32引力强度,恒 ≥ 0 且非 NaN。
label: Option<String>Trait Implementations§
Source§impl<'de> Deserialize<'de> for Edge
impl<'de> Deserialize<'de> for Edge
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
impl StructuralPartialEq for Edge
Auto Trait Implementations§
impl Forget for Edge
impl Freeze for Edge
impl Move for Edge
impl RefUnwindSafe for Edge
impl Send for Edgewhere
RawVecInner: Send,
impl Sync for Edgewhere
RawVecInner: Sync,
impl Unpin for Edge
impl UnsafeUnpin for Edge
impl UnwindSafe for Edgewhere
RawVecInner: UnwindSafe,
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