pub struct TargetEcho {
pub target_resolved: String,
pub target_source: TargetSource,
pub host_resolved: String,
pub host_source: TargetSource,
}Expand description
The resolved target, echoed under both the canonical and the legacy names.
§Why two spellings of one fact
Explicit Target Designation names these fields target_resolved / target_source,
and the 0.5.5 release shipped them as host_resolved / host_source before the law
was written down. Renaming in place would break every consumer that already reads
the 0.5.5 spelling — including the schemas under docs/schemas/, which list
host_resolved in their required arrays. Emitting both is the only move that
makes the canonical name available without invalidating a contract already in the
field: target_* is what new readers should bind to, host_* is a read alias kept
for compatibility and never a second source of truth. They are written from the
same ExecTarget in one place, so they cannot drift.
Flattened rather than nested: the alias only helps if it appears at the same depth as the field it replaces.
Fields§
§target_resolved: StringCanonical name of the host this invocation resolved.
target_source: TargetSourceCanonical provenance of Self::target_resolved.
host_resolved: StringCompatibility alias of Self::target_resolved (0.5.5 spelling).
host_source: TargetSourceCompatibility alias of Self::target_source (0.5.5 spelling).
Implementations§
Source§impl TargetEcho
impl TargetEcho
Sourcepub fn new(target: &ExecTarget) -> Self
pub fn new(target: &ExecTarget) -> Self
Builds the echo from a resolved target, filling canonical and alias alike.
Sourcepub fn from_parts(host: impl Into<String>, source: TargetSource) -> Self
pub fn from_parts(host: impl Into<String>, source: TargetSource) -> Self
Builds the echo from a name plus a provenance already decided by the caller.
Trait Implementations§
Source§impl Clone for TargetEcho
impl Clone for TargetEcho
Source§fn clone(&self) -> TargetEcho
fn clone(&self) -> TargetEcho
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TargetEcho
impl Debug for TargetEcho
Source§impl Default for TargetEcho
impl Default for TargetEcho
Source§fn default() -> TargetEcho
fn default() -> TargetEcho
Source§impl<'de> Deserialize<'de> for TargetEcho
impl<'de> Deserialize<'de> for TargetEcho
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>,
impl Eq for TargetEcho
Source§impl PartialEq for TargetEcho
impl PartialEq for TargetEcho
Source§impl Serialize for TargetEcho
impl Serialize for TargetEcho
impl StructuralPartialEq for TargetEcho
Auto Trait Implementations§
impl Freeze for TargetEcho
impl RefUnwindSafe for TargetEcho
impl Send for TargetEcho
impl Sync for TargetEcho
impl Unpin for TargetEcho
impl UnsafeUnpin for TargetEcho
impl UnwindSafe for TargetEcho
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.