pub struct Node {
pub key: String,
pub kind: NodeKind,
pub name: String,
pub path: Option<String>,
pub lang: Option<String>,
pub blob_hash: Option<String>,
pub span: Option<Span>,
pub meta: Value,
}Expand description
A node in the knowledge graph.
Node::key is the deterministic natural identity used for upserts (e.g.
sym:rust:src/lib.rs#Store); the database row id is an internal detail.
Fields§
§key: StringDeterministic, unique natural key.
kind: NodeKindThe kind of thing this node represents.
name: StringHuman-facing name (need not be unique).
path: Option<String>Repository-relative source path, if any.
lang: Option<String>Language token (e.g. rust), if applicable.
blob_hash: Option<String>Git blob hash this node was extracted from, if applicable.
span: Option<Span>Byte span within the source blob, if applicable.
meta: ValueArbitrary structured metadata.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Node
impl<'de> Deserialize<'de> for Node
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 Eq for Node
impl StructuralPartialEq for Node
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnsafeUnpin for Node
impl UnwindSafe for Node
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.