pub struct Invite {
pub id: InviteId,
pub operation: OperationId,
pub member: MemberId,
pub kind: InviteKind,
pub access: MemberAccess,
pub expires_at: SystemTime,
pub stage: InviteStage,
}Expand description
One of this device’s open invites (§13.2).
Fields§
§id: InviteIdThe one-time request path’s identity.
operation: OperationIdThe invite’s operation, which names its pending record in
coven_pending while its check or its grant waits or is refused.
member: MemberIdThe stable member id the invite fixed.
kind: InviteKindWhether the invite adds a new person or recovers a member.
access: MemberAccessThe access the invite grants: the account shared with, or the id of the S3 key it carries, never its secret (§14.3).
expires_at: SystemTimeThe invite’s lifetime after creation, on the inviting device’s clock.
stage: InviteStageWhere the invite is: granting its access, waiting for its request or the app’s decision, or approving its request.
Implementations§
Source§impl Invite
impl Invite
Sourcepub fn list(sql: SqlReadContext<'_>) -> Result<Vec<Invite>, DbError>
pub fn list(sql: SqlReadContext<'_>) -> Result<Vec<Invite>, DbError>
Read coven_invites, as an app’s live query does:
handle.subscribe(Invite::list). This device’s invites that haven’t
ended, in the order they were made (§13.2).
Sourcepub fn shown_code(&self) -> &str
pub fn shown_code(&self) -> &str
The code the invite shows.
Sourcepub fn shown_request(&self) -> Option<&JoinRequest>
pub fn shown_request(&self) -> Option<&JoinRequest>
The checked request, waiting for the app or being approved.
Trait Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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