#[non_exhaustive]pub enum SpaceJoinInput<'a> {
InviteCode(&'a str),
SpaceId(&'a Id),
}Expand description
How to join a Space — passed to Space/join.
The enum makes invalid inputs unrepresentable: exactly one path is always selected at construction time.
§Debug redaction
The InviteCode variant wraps the unguessable bearer credential from
draft-atwood-jmap-chat-00 §4.18 — anyone with the code can redeem it to
join the Space. The Debug impl on this enum redacts the inner string to
"[REDACTED]" so an accidental {:?}-format in an application log,
tracing span, or test fixture cannot leak it. The SpaceId variant is
not a secret (RFC 8620 §1.2) and is rendered verbatim.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InviteCode(&'a str)
Redeem a SpaceInvite by its code field (not its id).
Unguessable secret — redacted by the std::fmt::Debug impl on this enum.
SpaceId(&'a Id)
Join a public Space directly by its JMAP id.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for SpaceJoinInput<'a>
impl<'a> RefUnwindSafe for SpaceJoinInput<'a>
impl<'a> Send for SpaceJoinInput<'a>
impl<'a> Sync for SpaceJoinInput<'a>
impl<'a> Unpin for SpaceJoinInput<'a>
impl<'a> UnsafeUnpin for SpaceJoinInput<'a>
impl<'a> UnwindSafe for SpaceJoinInput<'a>
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