pub struct Edge {
pub edge_type: EdgeType,
pub target: BlockId,
pub metadata: EdgeMetadata,
pub created_at: DateTime<Utc>,
}Expand description
An edge represents an explicit relationship between blocks
Fields§
§edge_type: EdgeTypeType of relationship
target: BlockIdTarget block
metadata: EdgeMetadataEdge-specific metadata
created_at: DateTime<Utc>When the edge was created
Implementations§
Source§impl Edge
impl Edge
Sourcepub fn with_metadata(self, metadata: EdgeMetadata) -> Self
pub fn with_metadata(self, metadata: EdgeMetadata) -> Self
Add metadata to the edge
Sourcepub fn with_confidence(self, confidence: f32) -> Self
pub fn with_confidence(self, confidence: f32) -> Self
Add confidence score
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Add description
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 Freeze for Edge
impl RefUnwindSafe for Edge
impl Send for Edge
impl Sync for Edge
impl Unpin for Edge
impl UnwindSafe for Edge
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