#[non_exhaustive]pub struct ResolvedNode {
pub id: NodeId,
pub name: Option<String>,
pub description: Option<String>,
pub env: Option<BTreeMap<String, EnvValue>>,
pub cpu_affinity: Option<Vec<usize>>,
pub deploy: Option<Deploy>,
pub kind: CoreNodeKind,
}Expand description
A Node after alias resolution and defaulting, as the daemon runs it.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: NodeId§name: Option<String>§description: Option<String>§env: Option<BTreeMap<String, EnvValue>>§cpu_affinity: Option<Vec<usize>>§deploy: Option<Deploy>§kind: CoreNodeKindImplementations§
Source§impl ResolvedNode
impl ResolvedNode
Sourcepub fn new(id: NodeId, kind: CoreNodeKind) -> Self
pub fn new(id: NodeId, kind: CoreNodeKind) -> Self
A resolved node with the given ID and kind, and every other field left at its default.
ResolvedNode is #[non_exhaustive], so other crates cannot build one
with a struct literal. Start here and assign the fields you need — they
are all still pub.
Sourcepub fn from_node(node: Node, kind: CoreNodeKind) -> Self
pub fn from_node(node: Node, kind: CoreNodeKind) -> Self
The resolved node for node’s node-level keys — id, name,
description, env, cpu_affinity, deploy — around an already
resolved kind. env is carried as declared; merging the
dataflow-level env into it is the caller’s job.
The kind-level keys are dropped: for a custom node
CustomNode::from_node has already moved them out, and a runtime
node’s live in its operators.
This is a struct literal on purpose. ResolvedNode is
#[non_exhaustive], so a literal only compiles here, inside the
defining crate — exactly where the compiler still insists that every
field is accounted for. A field added to ResolvedNode is a build
error on this line, not a key that resolution silently leaves at its
default.
pub fn has_git_source(&self) -> bool
Trait Implementations§
Source§impl Clone for ResolvedNode
impl Clone for ResolvedNode
Source§fn clone(&self) -> ResolvedNode
fn clone(&self) -> ResolvedNode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more