pub enum NodeRef {
Plain(String),
Keyed {
name: String,
instance_id: Option<String>,
camera_id: Option<String>,
},
}Expand description
A single entry in a target’s node list, either a plain node identifier or a named instance for a node that needs to run as more than one instance under the same target.
Variants§
Plain(String)
A node running as its default, single instance.
Keyed
A node running as one of several keyed instances of the same node type, and/or with a
camera_id override (video-streamer’s relay/diagnostics identity). instance_id and
camera_id are independent and either can be set without the other.
Implementations§
Source§impl NodeRef
impl NodeRef
Sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
The node identifier (e.g. "@mecha10/camera"), regardless of entry shape.
Sourcepub fn instance_id(&self) -> Option<&str>
pub fn instance_id(&self) -> Option<&str>
The instance id, if this entry names a specific keyed instance.
Sourcepub fn camera_id(&self) -> Option<&str>
pub fn camera_id(&self) -> Option<&str>
The camera_id override, if this entry sets one. See the Keyed variant’s doc comment -
independent of instance_id.
Sourcepub fn wire_identifier(&self) -> String
pub fn wire_identifier(&self) -> String
The plain-string identifier this entry round-trips to wherever the CLI’s node-spawning
pipeline still deals in bare Vec<String> node identifiers ("name::instance_id#camera_id").
Sourcepub fn process_key(&self) -> String
pub fn process_key(&self) -> String
A key that’s unique per distinct (name, instance_id) pair within a target’s nodes
list, used to track/identify a running node process.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for NodeRef
impl<'de> Deserialize<'de> for NodeRef
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NodeRef, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<NodeRef, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for NodeRef
Source§impl JsonSchema for NodeRef
impl JsonSchema for NodeRef
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 NodeRef
impl Serialize for NodeRef
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 NodeRef
Auto Trait Implementations§
impl Freeze for NodeRef
impl RefUnwindSafe for NodeRef
impl Send for NodeRef
impl Sync for NodeRef
impl Unpin for NodeRef
impl UnsafeUnpin for NodeRef
impl UnwindSafe for NodeRef
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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