Skip to main content

Node

Struct Node 

Source
pub struct Node {
Show 29 fields pub id: String, pub title: String, pub status: NodeStatus, pub description: Option<String>, pub assigned_to: Option<String>, pub tags: Vec<String>, pub priority: Option<u8>, pub node_type: Option<String>, pub knowledge: KnowledgeNode, pub metadata: HashMap<String, Value>, pub file_path: Option<String>, pub lang: Option<String>, pub start_line: Option<usize>, pub end_line: Option<usize>, pub signature: Option<String>, pub visibility: Option<String>, pub doc_comment: Option<String>, pub body_hash: Option<String>, pub node_kind: Option<String>, pub owner: Option<String>, pub source: Option<String>, pub repo: Option<String>, pub parent_id: Option<String>, pub depth: Option<u32>, pub complexity: Option<f64>, pub is_public: Option<bool>, pub body: Option<String>, pub created_at: Option<String>, pub updated_at: Option<String>,
}
Expand description

A node in the graph (task, code file, component, etc.)

Fields§

§id: String§title: String§status: NodeStatus§description: Option<String>§assigned_to: Option<String>§tags: Vec<String>§priority: Option<u8>

Priority 0–255. SQLite stores as INTEGER; values outside 0–255 are clamped on read.

§node_type: Option<String>

Node type: task, file, component, feature, layer, etc.

§knowledge: KnowledgeNode

Knowledge storage: findings, file cache, and tool history.

§metadata: HashMap<String, Value>

Additional metadata.

§file_path: Option<String>

File path relative to the project root.

§lang: Option<String>

Programming language.

§start_line: Option<usize>

Start line number in the source file. Note: stored as INTEGER in SQLite; clamped to usize range on read.

§end_line: Option<usize>

End line number in the source file. Note: stored as INTEGER in SQLite; clamped to usize range on read.

§signature: Option<String>

Function/method signature.

§visibility: Option<String>

Visibility: public, private, crate, etc.

§doc_comment: Option<String>

Documentation comment extracted from source.

§body_hash: Option<String>

Hash of the body content (for change detection).

§node_kind: Option<String>

Code-level kind: Function, Struct, Impl, Trait, Enum, etc.

§owner: Option<String>

Owner of this node (person or team).

§source: Option<String>

Source of this node (e.g., “extract”, “manual”, “import”).

§repo: Option<String>

Repository this node belongs to.

§parent_id: Option<String>

Parent node ID (for hierarchical relationships).

§depth: Option<u32>

Depth in the node hierarchy (0 = root).

§complexity: Option<f64>

Complexity score (e.g., cyclomatic complexity).

§is_public: Option<bool>

Whether this node represents a public API surface.

§body: Option<String>

Full body/content of the node (source code, description text, etc.).

§created_at: Option<String>

ISO-8601 creation timestamp.

§updated_at: Option<String>

ISO-8601 last-updated timestamp.

Implementations§

Source§

impl Node

Source

pub fn new(id: &str, title: &str) -> Self

Source

pub fn with_description(self, desc: &str) -> Self

Source

pub fn with_status(self, status: NodeStatus) -> Self

Source

pub fn with_tags(self, tags: Vec<String>) -> Self

Source

pub fn with_priority(self, priority: u8) -> Self

Trait Implementations§

Source§

impl Clone for Node

Source§

fn clone(&self) -> Node

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Node

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Node

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Node

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,