pub struct CodeRecord {
pub id: CodeId,
pub lookup_key: LookupKey,
pub key_version: KeyVersion,
pub purpose: Option<String>,
pub scope: Option<String>,
pub grant: Option<String>,
pub expires_at: u64,
}Expand description
Parameters for inserting a new code record.
Fields§
§id: CodeIdStorage identifier (caller-assigned; UUID recommended).
lookup_key: LookupKeyDomain-separated HMAC of the normalized code (never the plaintext).
key_version: KeyVersionKey version that produced lookup_key.
purpose: Option<String>Optional host-owned purpose label (e.g. "redeem_invite").
scope: Option<String>Optional scope key (e.g. a community ID).
grant: Option<String>Optional opaque grant returned to the host after a won claim.
expires_at: u64Expiry as Unix seconds (UTC).
Auto Trait Implementations§
impl Freeze for CodeRecord
impl RefUnwindSafe for CodeRecord
impl Send for CodeRecord
impl Sync for CodeRecord
impl Unpin for CodeRecord
impl UnsafeUnpin for CodeRecord
impl UnwindSafe for CodeRecord
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