pub struct GovernanceEngine { /* private fields */ }Implementations§
Source§impl GovernanceEngine
impl GovernanceEngine
Sourcepub fn from_config(config: &GovernanceConfig) -> Self
pub fn from_config(config: &GovernanceConfig) -> Self
Instantiate the chain from config against the inventory registry.
Configured ids with no registered factory are logged and skipped.
Registered policies absent from the config are appended enabled: false, so the audit trace shows them as skipped rather than omitting
them.
Sourcepub fn policies(
&self,
) -> impl Iterator<Item = (&PolicyConfig, &dyn GovernancePolicy)>
pub fn policies( &self, ) -> impl Iterator<Item = (&PolicyConfig, &dyn GovernancePolicy)>
The instantiated chain in evaluation order, for dashboards and UI projections.
Sourcepub fn evaluate(&self, ctx: &PolicyContext<'_>) -> Evaluation
pub fn evaluate(&self, ctx: &PolicyContext<'_>) -> Evaluation
Run the chain first-deny-wins, tracing every entry.
Disabled entries and entries after the first deny record a
ChainEntryResult::Skip with zero duration; an empty or all-pass
chain allows with MatchedBy::DefaultIncluded.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for GovernanceEngine
impl !UnwindSafe for GovernanceEngine
impl Freeze for GovernanceEngine
impl Send for GovernanceEngine
impl Sync for GovernanceEngine
impl Unpin for GovernanceEngine
impl UnsafeUnpin for GovernanceEngine
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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>
Converts
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>
Converts
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