Skip to main content

Inode

Enum Inode 

Source
pub enum Inode {
Show 25 variants Null, Bool(bool), Int(i64), Float(f64), Str(String), DurationMs(u64), Quantity { value: NodeId, unit: UnitTag, }, Array { elements: Vec<NodeId>, }, Table { fields: Vec<(String, NodeId)>, }, Secret(SecretBytes), SecretRef { locator: NodeId, }, Ref(NodeId), Env { name: String, default: Option<NodeId>, }, Ident(String), Interpolate { parts: Vec<InterpPart>, }, Binary { op: BinOp, lhs: NodeId, rhs: NodeId, }, Unary { op: UnOp, expr: NodeId, }, Constrained { target: NodeId, constraint: Constraint, }, Patch(PatchOp), SchemaField(SchemaFieldSpec), SchemaTable { fields: Vec<(String, NodeId)>, closed: bool, }, SchemaArray { element: NodeId, }, Semantic { tag: SemanticTag, inner: NodeId, }, ContentAddressed { media_type: NodeId, data: NodeId, }, Blob { hash: [u8; 32], size: u64, tainted: bool, media_type: String, payload: Option<Vec<u8>>, },
}
Expand description

A module node.

Every variant is a value of the Active IR after name resolution; Ident is retained only because decoded third-party modules may still contain one (the encoder never emits it for canonical modules produced from active-core).

Debug is written by hand (never derived): blob payloads are summarized by identity and secrets render as Secret(***), so logging a module can never dump payload or secret bytes.

Variants§

§

Null

§

Bool(bool)

§

Int(i64)

§

Float(f64)

§

Str(String)

§

DurationMs(u64)

§

Quantity

Fields

§value: NodeId
§unit: UnitTag
§

Array

Fields

§elements: Vec<NodeId>
§

Table

Fields

§fields: Vec<(String, NodeId)>
§

Secret(SecretBytes)

A structural secret literal. Never equals anything.

§

SecretRef

A secret derived from a locator node (secret.env(NAME), secret(<expr>)).

Fields

§locator: NodeId
§

Ref(NodeId)

§

Env

Fields

§name: String
§default: Option<NodeId>
§

Ident(String)

§

Interpolate

Fields

§

Binary

Fields

§

Unary

Fields

§op: UnOp
§expr: NodeId
§

Constrained

Fields

§target: NodeId
§constraint: Constraint
§

Patch(PatchOp)

§

SchemaField(SchemaFieldSpec)

§

SchemaTable

Fields

§fields: Vec<(String, NodeId)>
§closed: bool
§

SchemaArray

Fields

§element: NodeId
§

Semantic

Fields

§inner: NodeId
§

ContentAddressed

blob(media_type, data) construction site (reserved kind 24).

Fields

§media_type: NodeId
§data: NodeId
§

Blob

A materialised content-addressed blob identity.

payload is present only for untainted blobs that were materialised; a tainted blob never carries bytes, and the codec refuses a tainted blob entry whose payload is non-empty.

Fields

§hash: [u8; 32]
§size: u64
§tainted: bool
§media_type: String
§payload: Option<Vec<u8>>

Implementations§

Source§

impl Inode

Source

pub const fn kind(&self) -> SerializedKind

Stable kind identity of this node.

Source§

impl Inode

Source

pub const fn kind_code(&self) -> u8

Stable kind discriminant (wire contract, docs/spec/layout.md §5.1).

Source

pub const fn is_secret(&self) -> bool

Whether this node carries secret material or a secret locator.

Source

pub fn children(&self) -> Vec<NodeId>

Node references in canonical child order.

This is the single source of truth for the dependency edges, the canonical numbering traversal, cycle detection and graph queries. It must list every node reference the variant holds.

Source

pub fn strings(&self, out: &mut Vec<String>)

Every string this node owns, for heap construction.

Trait Implementations§

Source§

impl Clone for Inode

Source§

fn clone(&self) -> Self

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 Inode

Source§

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

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

impl PartialEq for Inode

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Inode

Auto Trait Implementations§

§

impl Freeze for Inode

§

impl RefUnwindSafe for Inode

§

impl Send for Inode

§

impl Sync for Inode

§

impl Unpin for Inode

§

impl UnsafeUnpin for Inode

§

impl UnwindSafe for Inode

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 = !

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.