pub struct PolicyValidity {
pub authorization_id: String,
pub authority: String,
pub reason: String,
pub not_before: SystemTime,
pub expires_at: SystemTime,
}Expand description
Auditable, caller-authorized exception with an exclusive expiration boundary. The core does not decide who is entitled to grant exceptions; the trusted application authenticates that authority before constructing this value.
Fields§
Application’s audit record identifier, unrelated to document content.
Authenticated principal granting the exception.
reason: StringNon-secret justification retained for audit.
not_before: SystemTimeInclusive beginning of validity.
expires_at: SystemTimeExclusive expiration; cached policies cannot outlive this boundary.
Implementations§
Source§impl PolicyValidity
impl PolicyValidity
Sourcepub fn validate_at(&self, now: SystemTime) -> Result<(), PolicyViolation>
pub fn validate_at(&self, now: SystemTime) -> Result<(), PolicyViolation>
Check metadata and the half-open interval against an explicit time.
Trait Implementations§
Source§impl Clone for PolicyValidity
impl Clone for PolicyValidity
Source§impl Debug for PolicyValidity
impl Debug for PolicyValidity
impl Eq for PolicyValidity
Source§impl PartialEq for PolicyValidity
impl PartialEq for PolicyValidity
impl StructuralPartialEq for PolicyValidity
Auto Trait Implementations§
impl Freeze for PolicyValidity
impl RefUnwindSafe for PolicyValidity
impl Send for PolicyValidity
impl Sync for PolicyValidity
impl Unpin for PolicyValidity
impl UnsafeUnpin for PolicyValidity
impl UnwindSafe for PolicyValidity
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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