#[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§impl Debug for ResolvedNode
impl Debug for ResolvedNode
Source§impl<'de> Deserialize<'de> for ResolvedNode
impl<'de> Deserialize<'de> for ResolvedNode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ResolvedNode
impl RefUnwindSafe for ResolvedNode
impl Send for ResolvedNode
impl Sync for ResolvedNode
impl Unpin for ResolvedNode
impl UnsafeUnpin for ResolvedNode
impl UnwindSafe for ResolvedNode
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more