pub struct Invite {
pub id: String,
pub org_id: String,
pub email: String,
pub role: OrgRole,
pub invited_by: String,
pub token_hash: String,
pub token_prefix: String,
pub created_at: u64,
pub expires_at: u64,
pub accepted_at: Option<u64>,
}Fields§
§id: StringStable id — inv_<24-char-base64url>. What you reference in
management UIs (revoke, resend).
org_id: String§email: StringEmail of the invitee. Lowercased before storage so case-only duplicates collapse.
role: OrgRoleRole the invitee will receive on accept.
invited_by: StringUser id of whoever sent the invite. Used in the email body (“Alice invited you to Acme Corp”).
token_hash: StringSingle-use random token — what the invitee clicks. Stored hashed (Argon2) so a DB read doesn’t leak active invites. The plaintext is sent in the email and never persisted.
token_prefix: StringFirst 8 chars of the plaintext token — display in management UIs so the inviter can identify which link they sent.
created_at: u64§expires_at: u64§accepted_at: Option<u64>Trait Implementations§
Source§impl<'de> Deserialize<'de> for Invite
impl<'de> Deserialize<'de> for Invite
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
impl Eq for Invite
impl StructuralPartialEq for Invite
Auto Trait Implementations§
impl Freeze for Invite
impl RefUnwindSafe for Invite
impl Send for Invite
impl Sync for Invite
impl Unpin for Invite
impl UnsafeUnpin for Invite
impl UnwindSafe for Invite
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