pub struct InvitationRecord {
pub ref: Option<RecordRef>,
pub version: Vec<u8>,
pub role: i32,
pub expires_at: Option<Timestamp>,
pub state: i32,
pub created_at: Option<Timestamp>,
pub updated_at: Option<Timestamp>,
pub inviter: Option<PublicOwner>,
pub inviter_via_agent_label: String,
pub spool_name: String,
pub spool_address: Option<SpoolAddress>,
pub recipient: Option<Recipient>,
}Expand description
Inviter-side People/invitations read model, also used in the invitee’s inbox. Terminal states never reopen. Only the selected recipient arm is returned: a handle is NEVER replaced/supplemented with its resolved account UUID. This protects private bindings before acceptance; after Accept/Redeem the member/grant records expose the human principal under normal authorization. InvitationRecord keeps its original arm even after acceptance. Hosts MUST run the shared InvitationRecord projection gate on ObserveSpool, notification, attention and Create/replay outputs. Server-only bindings are not wire fields.
Fields§
§ref: Option<RecordRef>§version: Vec<u8>§role: i32§expires_at: Option<Timestamp>§state: i32Read-only. Create requires UNSPECIFIED; the host commits PENDING.
created_at: Option<Timestamp>Read-only server commit times. No-op retries preserve version and times.
updated_at: Option<Timestamp>§inviter: Option<PublicOwner>Current public accountable human, with the same lifecycle/handle omission and “handle, optionally display name, optionally via label” rules as InvitationResolution. Never an agent principal as a separate person.
inviter_via_agent_label: String§spool_name: StringRead-only invitation-scoped display, including for invitees without spool membership. This permits no other spool read and does not imply membership.
spool_address: Option<SpoolAddress>Secrets are returned only for email CreateInvitation and creator-only GetInvitationCode, never observations, inbox or receipts. Accept/Redeem grant once, preserving an active existing role if stronger and preserving its include_descendants bit; a new grant sets it false.
recipient: Option<Recipient>Implementations§
Source§impl InvitationRecord
impl InvitationRecord
Sourcepub fn role(&self) -> ResourceRole
pub fn role(&self) -> ResourceRole
Returns the enum value of role, or the default if the field is set to an invalid enum value.
Sourcepub fn set_role(&mut self, value: ResourceRole)
pub fn set_role(&mut self, value: ResourceRole)
Sets role to the provided enum value.
Sourcepub fn state(&self) -> InvitationState
pub fn state(&self) -> InvitationState
Returns the enum value of state, or the default if the field is set to an invalid enum value.
Sourcepub fn set_state(&mut self, value: InvitationState)
pub fn set_state(&mut self, value: InvitationState)
Sets state to the provided enum value.
Trait Implementations§
Source§impl Clone for InvitationRecord
impl Clone for InvitationRecord
Source§fn clone(&self) -> InvitationRecord
fn clone(&self) -> InvitationRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InvitationRecord
impl Debug for InvitationRecord
Source§impl Default for InvitationRecord
impl Default for InvitationRecord
Source§fn default() -> InvitationRecord
fn default() -> InvitationRecord
impl Eq for InvitationRecord
Source§impl Hash for InvitationRecord
impl Hash for InvitationRecord
Source§impl Message for InvitationRecord
impl Message for InvitationRecord
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for InvitationRecord
impl PartialEq for InvitationRecord
impl StructuralPartialEq for InvitationRecord
Auto Trait Implementations§
impl Freeze for InvitationRecord
impl RefUnwindSafe for InvitationRecord
impl Send for InvitationRecord
impl Sync for InvitationRecord
impl Unpin for InvitationRecord
impl UnsafeUnpin for InvitationRecord
impl UnwindSafe for InvitationRecord
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more