pub struct NamespaceEnumerator { /* private fields */ }Expand description
Accumulates the set of node paths a genesis must cover, deduplicated and deterministically ordered.
The enumerator is intentionally source-agnostic: it collects candidate node
paths from whichever surfaces are available (the compile-time service factory
inventory, the export-root skeleton, a live [Namespace]’s mount prefixes) and
normalizes them into one sorted, deduplicated set. The completeness check
(GenesisReport) then runs against exactly this set — so the report’s node
list is only as complete as what the enumerator was told to walk. Adding a new
export surface means adding a source here, not changing the mechanism.
Implementations§
Source§impl NamespaceEnumerator
impl NamespaceEnumerator
Sourcepub fn production() -> Self
pub fn production() -> Self
The default production node set: export-root skeleton + every registered
/srv/{name} service mount + the standard non-service mounts. This is the
set a daemon exports today; it’s derived from the compile-time inventory so
it needs no running namespace.
Sourcepub fn with_export_roots(self) -> Self
pub fn with_export_roots(self) -> Self
Add the export-root skeleton nodes (EXPORT_ROOTS).
Sourcepub fn with_service_inventory(self) -> Self
pub fn with_service_inventory(self) -> Self
Add /srv/{name} for every service registered via #[service_factory]
(the inventory the daemon actually mounts under /srv).
Sourcepub fn with_standard_mounts(self) -> Self
pub fn with_standard_mounts(self) -> Self
Add the standard non-service mount points (STANDARD_NON_SERVICE_MOUNTS).
Sourcepub fn with_namespace(self, ns: &Namespace) -> Self
pub fn with_namespace(self, ns: &Namespace) -> Self
Add every mount prefix of a live [Namespace] (e.g. a composed export
namespace). Complements the static inventory with whatever a particular
process actually bound at runtime.
Sourcepub fn with_node(self, path: impl AsRef<str>) -> Self
pub fn with_node(self, path: impl AsRef<str>) -> Self
Add a single explicit node path (site-specific extension point).
Sourcepub fn into_nodes(self) -> Vec<String>
pub fn into_nodes(self) -> Vec<String>
The collected node set, sorted and deduplicated.
Trait Implementations§
Source§impl Clone for NamespaceEnumerator
impl Clone for NamespaceEnumerator
Source§fn clone(&self) -> NamespaceEnumerator
fn clone(&self) -> NamespaceEnumerator
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 NamespaceEnumerator
impl Debug for NamespaceEnumerator
Source§impl Default for NamespaceEnumerator
impl Default for NamespaceEnumerator
Source§fn default() -> NamespaceEnumerator
fn default() -> NamespaceEnumerator
Auto Trait Implementations§
impl Freeze for NamespaceEnumerator
impl RefUnwindSafe for NamespaceEnumerator
impl Send for NamespaceEnumerator
impl Sync for NamespaceEnumerator
impl Unpin for NamespaceEnumerator
impl UnsafeUnpin for NamespaceEnumerator
impl UnwindSafe for NamespaceEnumerator
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 moreSource§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::Request