pub struct Waiver {
pub id: String,
pub rule: String,
pub path: String,
pub reason: String,
pub author: String,
pub granted_at: String,
pub expires_at: String,
pub supersedes: Option<String>,
pub contradicts: Option<String>,
}Expand description
One signed waiver record. Externally deserialized — unknown fields are rejected loudly (AGENTS.md serde rule).
Fields§
§id: String§rule: String§path: String§reason: String§granted_at: StringUTC ISO-8601 (RFC 3339) — one convention, documented here.
expires_at: String§supersedes: Option<String>§contradicts: Option<String>Implementations§
Source§impl Waiver
impl Waiver
Sourcepub fn grant(request: GrantRequest) -> Result<Self, WaiverError>
pub fn grant(request: GrantRequest) -> Result<Self, WaiverError>
Builds a signed record: fresh UUID, granted_at = now,
expires_at = now + ttl (temporary by default is the point).
§Errors
Returns WaiverError::Timestamp on RFC 3339 formatting failure.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Waiver
impl<'de> Deserialize<'de> for Waiver
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 Waiver
impl RefUnwindSafe for Waiver
impl Send for Waiver
impl Sync for Waiver
impl Unpin for Waiver
impl UnsafeUnpin for Waiver
impl UnwindSafe for Waiver
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