pub struct Verified<T> {
inner: T,
signed_at: DateTime<Utc>,
}Expand description
Type-level witness that bytes passed signature + freshness + schema +
reject_before gates against trust roots. No public constructor; the
only way to obtain one is via a verify_* function in this module.
#[derive(Deserialize)] is intentionally omitted so the witness cannot
be fabricated from a serialized form.
A function taking &Verified<T> is statically guaranteed to have
received a payload that was verified against the trust config; future
“skip verify” shortcuts cannot compile without crossing the same gate.
Fields§
§inner: T§signed_at: DateTime<Utc>Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Verified<T>where
T: Freeze,
impl<T> RefUnwindSafe for Verified<T>where
T: RefUnwindSafe,
impl<T> Send for Verified<T>where
T: Send,
impl<T> Sync for Verified<T>where
T: Sync,
impl<T> Unpin for Verified<T>where
T: Unpin,
impl<T> UnwindSafe for Verified<T>where
T: UnwindSafe,
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