Skip to main content

NodeDescribe

Struct NodeDescribe 

Source
pub struct NodeDescribe {
    pub type: NodeTypeStr,
    pub status: NodeStatus,
    pub value: Option<DescribeValue>,
    pub sentinel: Option<bool>,
    pub deps: Vec<String>,
    pub operator_kind: Option<String>,
    pub meta: Option<Value>,
}
Expand description

Per-node descriptor.

§JSON-shape disambiguation (D279, 2026-05-22, E-ii.3 — Rust ↔ TS parity)

Sentinel-vs-JSON-null disambiguation matches the TS describeNode shape (packages/pure-ts/src/core/meta.ts DescribeNodeOutput { value?: unknown, sentinel?: boolean }):

  • Sentinel cache (cache == NO_HANDLE AND status == NodeStatus::Sentinel) → value key omitted from JSON; sentinel: true present.
  • Legitimate JSON-null user value (DescribeValue::Rendered(Value::Null) under crate::Graph::describe_with_debug) → "value": null present; sentinel key omitted.
  • Any other value → "value": <v> present; sentinel key omitted.

Pre-D279 the Rust shape diverged: value: None (sentinel) and value: Some(DescribeValue::Rendered(Value::Null)) (rendered null) both serialized to "value": null — JSON-indistinguishable. #[serde(skip_serializing_if = "Option::is_none")] on both value and sentinel enforces the converged TS-shape. Rust additionally always emits status (TS makes it optional via includeFields); the sentinel flag is redundant for Rust consumers that check status == "sentinel", but its presence preserves cross-impl shape parity (cross-track-ledger §2 row 2026-05-22).

Fields§

§type: NodeTypeStr

"state" / "derived" / "dynamic" / "producer".

§status: NodeStatus

Lifecycle status (canonical Appendix B enum).

§value: Option<DescribeValue>

Current cache value. None when sentinel (NO_HANDLE); omitted from serialized JSON via skip_serializing_if (D279).

§sentinel: Option<bool>

D279 (2026-05-22): explicit sentinel discriminator matching TS’s sentinel?: boolean field. Some(true) when status == NodeStatus::Sentinel; None otherwise (omitted from JSON via skip_serializing_if).

§deps: Vec<String>

Dep names in declaration order (_anon_<NodeId> for unnamed).

§operator_kind: Option<String>

Operator discriminant (e.g. "map"); None for non-operators.

§meta: Option<Value>

Free-form metadata per canonical Appendix B. Always None in this slice (metadata-storage primitive not yet shipped).

Trait Implementations§

Source§

impl Clone for NodeDescribe

Source§

fn clone(&self) -> NodeDescribe

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for NodeDescribe

Source§

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

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

impl Serialize for NodeDescribe

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§

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, 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> Same for T

Source§

type Output = T

Should always be Self
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.