pub struct CodeMeta {
pub id: CodeId,
pub key_version: KeyVersion,
pub purpose: Option<String>,
pub scope: Option<String>,
pub grant: Option<String>,
pub created_at: Option<u64>,
pub expires_at: u64,
pub used_at: Option<u64>,
pub used_by: Option<SubjectId>,
pub revoked_at: Option<u64>,
}Expand description
Metadata record for a code — safe for admin display (RFC-030).
Contains no plaintext code value and no HMAC lookup key.
Fields§
§id: CodeIdOpaque record identifier.
key_version: KeyVersionThe key version under which this code was stored.
purpose: Option<String>Optional host-owned purpose label.
scope: Option<String>Optional scope label.
grant: Option<String>Opaque host-owned grant payload (safe to return to admins).
created_at: Option<u64>Creation time as Unix seconds (UTC), if available.
expires_at: u64Expiry as Unix seconds (UTC).
used_at: Option<u64>When the code was claimed, if it was.
used_by: Option<SubjectId>Which subject claimed it, if it was claimed.
revoked_at: Option<u64>When the code was revoked, if it was.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CodeMeta
impl RefUnwindSafe for CodeMeta
impl Send for CodeMeta
impl Sync for CodeMeta
impl Unpin for CodeMeta
impl UnsafeUnpin for CodeMeta
impl UnwindSafe for CodeMeta
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