pub struct OverlayRuntime { /* private fields */ }Expand description
The running project governance.
Implementations§
Source§impl OverlayRuntime
impl OverlayRuntime
Sourcepub fn reload(&self) -> Result<Applied, OverlayError>
pub fn reload(&self) -> Result<Applied, OverlayError>
Re-read the overlay (and a newer parent policy, if the file holds one) and apply. The only path by which a disk edit takes effect. A deleted overlay file is refused once a non-empty overlay is in force; an empty file is the deliberate way to clear it.
Sourcepub fn apply_parent_update(
&self,
policy: ParentPolicy,
) -> Result<Applied, OverlayError>
pub fn apply_parent_update( &self, policy: ParentPolicy, ) -> Result<Applied, OverlayError>
Accept a pushed policy: valid user signature, version no older than the newest accepted, merged with the overlay as last loaded (the file on disk is not consulted). The project must still be unrevoked and its certificate unexpired.
Sourcepub fn effective_rules(&self) -> (Vec<GovernanceRule>, f64, bool)
pub fn effective_rules(&self) -> (Vec<GovernanceRule>, f64, bool)
The effective rules and engine parameters now in force.
Sourcepub fn effective_rules_and_hash(
&self,
) -> ((Vec<GovernanceRule>, f64, bool), String)
pub fn effective_rules_and_hash( &self, ) -> ((Vec<GovernanceRule>, f64, bool), String)
Self::effective_rules and the effective hash (hex) from ONE lock
acquisition, so the pair always describes the same generation.
Sourcepub fn overlay_path(&self) -> Option<PathBuf>
pub fn overlay_path(&self) -> Option<PathBuf>
Path of the overlay file this kernel reads on reload.
Auto Trait Implementations§
impl !Freeze for OverlayRuntime
impl RefUnwindSafe for OverlayRuntime
impl Send for OverlayRuntime
impl Sync for OverlayRuntime
impl Unpin for OverlayRuntime
impl UnsafeUnpin for OverlayRuntime
impl UnwindSafe for OverlayRuntime
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
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