Skip to main content

PlanNodeWire

Struct PlanNodeWire 

Source
pub struct PlanNodeWire<'a> {
    pub operator_type: &'a str,
    pub id: i64,
    pub details: &'a str,
    pub estimated_rows: Option<i64>,
    pub metrics: Option<PlanMetricsWire>,
    pub args: &'a IndexMap<String, CypherValue>,
    pub identifiers: Vec<&'a str>,
    pub children: &'a [CypherValue],
    pub warnings: Vec<PlanWarning>,
}
Expand description

The typed view of one structured-plan wire node (ADR-0344/0345): the producer (relate’s PlanNode::to_value) emits exactly this shape, so this accessor states the invariants instead of tolerating misses — a malformed plan fails loudly rather than silently dropping a row or shifting cells into the wrong column.

Fields§

§operator_type: &'a str§id: i64§details: &'a str§estimated_rows: Option<i64>§metrics: Option<PlanMetricsWire>

PROFILE metrics (ADR-0344 phase 2 + metric fields): rows produced, elapsed time, store accesses, and row-materialization bytes — present only on PROFILE trees: the producer always emits the four args metric fields together, so a half-present set is a wire-contract break that fails loudly.

§args: &'a IndexMap<String, CypherValue>

The node’s args map, validated by the accessor (a map, present): a consumer reshaping the node (the HTTP Query API v2 plan) reads its display and identity entries from here rather than re-matching the raw map, so the invariant is stated once.

§identifiers: Vec<&'a str>

The identifier names the operator introduces, validated as strings at the accessor: the producer always emits the key as a list of strings, so a miss, a non-list or a non-string element is a wire-contract break that fails loudly here — the one place the invariant lives, never a per-consumer element check.

§children: &'a [CypherValue]

The child nodes’ raw wire values — the consumer recurses through plan_node_wire itself, so the typed view stays shallow.

§warnings: Vec<PlanWarning>

The typed warnings the node carries (typed node warnings): parsed into the one PlanWarning vocabulary — an entry outside it (or a payload shape its variant does not carry) is a wire-contract break that fails loudly at the accessor, never a silently dropped warning.

Implementations§

Source§

impl PlanNodeWire<'_>

Source

pub fn input_rows(&self) -> Option<u64>

The node’s input-row count (LABS-343’s structural fact): the first child’s produced rows — the bottom-up nesting puts each earlier clause under the one it feeds — None when the node has no input child (the statement’s one seed row). The one spelling, read by the plan walk and the flag fold alike.

Auto Trait Implementations§

§

impl<'a> Forget for PlanNodeWire<'a>

§

impl<'a> Freeze for PlanNodeWire<'a>

§

impl<'a> Move for PlanNodeWire<'a>

§

impl<'a> RefUnwindSafe for PlanNodeWire<'a>

§

impl<'a> Send for PlanNodeWire<'a>

§

impl<'a> Sync for PlanNodeWire<'a>

§

impl<'a> Unpin for PlanNodeWire<'a>

§

impl<'a> UnsafeUnpin for PlanNodeWire<'a>

§

impl<'a> UnwindSafe for PlanNodeWire<'a>

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.