pub struct GenesisMap { /* private fields */ }Expand description
A deterministic, explicit map from a static node path to its genesis label.
Built once at startup from the schema annotations + site policy. There is no
wildcard fallthrough to a default label — coverage is by explicit assignment
only. (A site MAY add an explicit "*"-style rule in its source policy,
but it must materialize to concrete per-node assignments here so the
completeness check sees real coverage, not an implicit catch-all.)
Implementations§
Source§impl GenesisMap
impl GenesisMap
pub fn new() -> Self
Sourcepub fn assign(self, path: impl Into<String>, label: SecurityLabel) -> Self
pub fn assign(self, path: impl Into<String>, label: SecurityLabel) -> Self
Assign a genesis label to a node path. Returns self for chaining.
Sourcepub fn resolve(&self, path: &str) -> Option<&SecurityLabel>
pub fn resolve(&self, path: &str) -> Option<&SecurityLabel>
The label for a node path, if explicitly assigned. None ⇒ unlabeled
⇒ deny. No default.
Sourcepub fn resolve_node(&self, path: &str, lattice: &Lattice) -> StaticNodeLabel
pub fn resolve_node(&self, path: &str, lattice: &Lattice) -> StaticNodeLabel
Resolve a node path to a StaticNodeLabel, validating it against the
active lattice. An unassigned path or an ill-formed label both yield an
unlabeled node (fail-closed) — the distinction is surfaced only by
GenesisMap::report for operator visibility.
Sourcepub fn report<'a>(
&self,
all_nodes: impl IntoIterator<Item = &'a str>,
lattice: &Lattice,
) -> GenesisReport
pub fn report<'a>( &self, all_nodes: impl IntoIterator<Item = &'a str>, lattice: &Lattice, ) -> GenesisReport
Check genesis completeness over the full set of nodes that must be labeled (the schema’s static-node inventory). Partitions every node into labeled / unlabeled / ill-formed. This is the audited bootstrap gate.
Trait Implementations§
Source§impl Clone for GenesisMap
impl Clone for GenesisMap
Source§fn clone(&self) -> GenesisMap
fn clone(&self) -> GenesisMap
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 GenesisMap
impl Debug for GenesisMap
Source§impl Default for GenesisMap
impl Default for GenesisMap
Source§fn default() -> GenesisMap
fn default() -> GenesisMap
Auto Trait Implementations§
impl Freeze for GenesisMap
impl RefUnwindSafe for GenesisMap
impl Send for GenesisMap
impl Sync for GenesisMap
impl Unpin for GenesisMap
impl UnsafeUnpin for GenesisMap
impl UnwindSafe for GenesisMap
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> 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 more