struct RuleVersionHistory {
versions: Vec<CompiledRule>,
active_version: Option<u64>,
status_by_version: HashMap<u64, RuleStatus>,
registered_at: HashMap<u64, SystemTime>,
}Expand description
Per-rule version history and status tracking.
Fields§
§versions: Vec<CompiledRule>Versions ordered by the registry’s insertion order (FIFO). The
oldest entry is evicted first when we exceed max_history.
active_version: Option<u64>Currently active version (if any).
status_by_version: HashMap<u64, RuleStatus>Lifecycle status per version.
registered_at: HashMap<u64, SystemTime>When each version was registered.
Implementations§
Source§impl RuleVersionHistory
impl RuleVersionHistory
fn new() -> Self
Sourcefn insert_version(&mut self, rule: CompiledRule, max_history: usize)
fn insert_version(&mut self, rule: CompiledRule, max_history: usize)
Insert a new version. Does not touch status — the caller sets it.
Evicts the oldest version if we exceed max_history.
fn get(&self, version: u64) -> Option<&CompiledRule>
fn active(&self) -> Option<&CompiledRule>
Auto Trait Implementations§
impl Freeze for RuleVersionHistory
impl RefUnwindSafe for RuleVersionHistory
impl Send for RuleVersionHistory
impl Sync for RuleVersionHistory
impl Unpin for RuleVersionHistory
impl UnsafeUnpin for RuleVersionHistory
impl UnwindSafe for RuleVersionHistory
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
§fn deserialize(
&self,
deserializer: &mut D,
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
§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>
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.