pub struct SubsystemIdentifier { /* private fields */ }Expand description
A fully qualified, canonical identifier for a uniquely addressable subsystem within the overall system.
SubsystemIdentifier is meant to represent a unique identifier for any “subsystem” in a Saluki-based data plane
such that it is already sanitized, normalized, and ready to be used in the various registries and areas where unique
names are required: health registry, resource account, supervision trees, and more.
Segments are sanitized as they are added, and any segment that sanitizes to an empty string is dropped. A
SubsystemIdentifier therefore never contains an empty segment, and its rendered form never has a leading,
trailing, or doubled separator.
Implementations§
Source§impl SubsystemIdentifier
impl SubsystemIdentifier
Sourcepub fn from_segments<I, S>(segments: I) -> Self
pub fn from_segments<I, S>(segments: I) -> Self
Creates a SubsystemIdentifier from a number of segments.
Each segment is sanitized/normalized independently, and any segment that sanitizes to an empty string is dropped.
Sourcepub fn from_dotted(dotted: &str) -> Self
pub fn from_dotted(dotted: &str) -> Self
Creates a SubsystemIdentifier from a single dotted string, treating each period as a segment separator.
The input is split on ., then each segment is sanitized/normalized independently (matching
from_segments) and empty segments are dropped. This is the correct constructor when the
caller already holds an assembled, dotted name (for example topology.primary.sources.in); passing such a
string to from_segments as a lone segment would instead collapse the periods into
underscores.
Sourcepub fn child<S: AsRef<str>>(self, segment: S) -> Self
pub fn child<S: AsRef<str>>(self, segment: S) -> Self
Consumes the identifier and returns a new one with the given segment appended.
The segment is sanitized/normalized first; if it sanitizes to empty, the identifier is returned unchanged.
Sourcepub fn is_ancestor_of(&self, other: &SubsystemIdentifier) -> bool
pub fn is_ancestor_of(&self, other: &SubsystemIdentifier) -> bool
Returns true if other is a strict descendant of this identifier.
A descendant has this identifier as a complete leading run of segments and at least one additional segment. For
example, env_provider.workload is an ancestor of env_provider.workload.remote_agent but not of
env_provider.workloads (segments are compared whole, not as string prefixes), nor of env_provider.workload
itself (the match must be strict).
Trait Implementations§
Source§impl Clone for SubsystemIdentifier
impl Clone for SubsystemIdentifier
Source§fn clone(&self) -> SubsystemIdentifier
fn clone(&self) -> SubsystemIdentifier
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SubsystemIdentifier
impl Debug for SubsystemIdentifier
Source§impl Display for SubsystemIdentifier
impl Display for SubsystemIdentifier
Source§impl Hash for SubsystemIdentifier
impl Hash for SubsystemIdentifier
Source§impl PartialEq for SubsystemIdentifier
impl PartialEq for SubsystemIdentifier
impl Eq for SubsystemIdentifier
impl StructuralPartialEq for SubsystemIdentifier
Auto Trait Implementations§
impl Freeze for SubsystemIdentifier
impl RefUnwindSafe for SubsystemIdentifier
impl Send for SubsystemIdentifier
impl Sync for SubsystemIdentifier
impl Unpin for SubsystemIdentifier
impl UnwindSafe for SubsystemIdentifier
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,
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Track for T
impl<T> Track for T
§fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self>
fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self>
Tracked wrapper. Read more§fn in_current_resource_group(self) -> Tracked<Self>
fn in_current_resource_group(self) -> Tracked<Self>
Tracked wrapper. Read more