pub struct AuditEntry {
pub path: String,
pub diff_type: DiffType,
pub reason: String,
pub strategy: AuditStrategy,
pub enabled: bool,
pub ticket: Option<String>,
pub approved_by: Option<String>,
pub approved_at: Option<DateTime<Utc>>,
pub expires_at: Option<NaiveDate>,
pub note: Option<String>,
pub created_at: Option<DateTime<Utc>>,
pub updated_at: Option<DateTime<Utc>>,
}Fields§
§path: StringRoot-relative path or glob pattern.
diff_type: DiffType§reason: StringMandatory human-readable justification.
strategy: AuditStrategy§enabled: bool§ticket: Option<String>Ticket or issue reference (e.g. “JIRA-123”, “INF-42”).
approved_by: Option<String>Identity of the person who approved this entry.
approved_at: Option<DateTime<Utc>>UTC timestamp when approval was recorded.
expires_at: Option<NaiveDate>Date after which this entry should be re-reviewed.
note: Option<String>Free-form note (stored but not used for judgement).
created_at: Option<DateTime<Utc>>UTC timestamp when this entry was first created.
updated_at: Option<DateTime<Utc>>UTC timestamp when this entry was last modified.
Implementations§
Source§impl AuditEntry
impl AuditEntry
pub fn is_glob(&self) -> bool
pub fn glob_matches(&self, candidate: &str) -> bool
Sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
True if expires_at is today or in the past.
Sourcepub fn expires_soon(&self, days: i64) -> bool
pub fn expires_soon(&self, days: i64) -> bool
True if expiring within days days but not yet expired.
Sourcepub fn stamp_now(&mut self)
pub fn stamp_now(&mut self)
Stamp created_at (first time) and updated_at (always) with the current UTC time.
pub fn is_approvable(&self) -> Result<(), String>
Trait Implementations§
Source§impl Clone for AuditEntry
impl Clone for AuditEntry
Source§fn clone(&self) -> AuditEntry
fn clone(&self) -> AuditEntry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AuditEntry
impl Debug for AuditEntry
Source§impl<'de> Deserialize<'de> for AuditEntry
impl<'de> Deserialize<'de> for AuditEntry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AuditEntry
impl RefUnwindSafe for AuditEntry
impl Send for AuditEntry
impl Sync for AuditEntry
impl Unpin for AuditEntry
impl UnsafeUnpin for AuditEntry
impl UnwindSafe for AuditEntry
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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