pub enum NodeEntry {
Version(String),
Detailed {
version: String,
enabled: bool,
capabilities: Vec<Capability>,
},
}Expand description
One node’s entry in NodesConfig’s map: either the common plain pinned-version string
(e.g. "0.1.0", "latest"), or an expanded object form that additionally declares this
node’s Capability set and/or disables it without removing its entry entirely. The
expanded form’s capabilities mirrors how run_target is explicit, per-node, author-set
config (never auto-inferred from node type) - see Capability and
NodeImpl::CAPABILITIES’s doc comment.
Variants§
Version(String)
Plain pinned version - implicitly enabled, no declared capabilities.
Detailed
Expanded form declaring enabled/capabilities alongside the pinned version.
Implementations§
Source§impl NodeEntry
impl NodeEntry
Sourcepub fn version(&self) -> &str
pub fn version(&self) -> &str
This entry’s pinned version, regardless of which form it’s written in.
Sourcepub fn enabled(&self) -> bool
pub fn enabled(&self) -> bool
Whether this node is enabled - true for the plain version-string form (presence in
the map means “on”), or the expanded form’s own enabled value (default true).
Sourcepub fn capabilities(&self) -> &[Capability]
pub fn capabilities(&self) -> &[Capability]
This entry’s declared capabilities - empty for the plain version-string form.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for NodeEntry
impl<'de> Deserialize<'de> for NodeEntry
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NodeEntry, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<NodeEntry, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for NodeEntry
impl JsonSchema for NodeEntry
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Serialize for NodeEntry
impl Serialize for NodeEntry
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for NodeEntry
Auto Trait Implementations§
impl Freeze for NodeEntry
impl RefUnwindSafe for NodeEntry
impl Send for NodeEntry
impl Sync for NodeEntry
impl Unpin for NodeEntry
impl UnsafeUnpin for NodeEntry
impl UnwindSafe for NodeEntry
Blanket Implementations§
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
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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