#[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
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.
Precondition: must be non-empty.
Self::space_join rejects
an empty value client-side with
ClientError::InvalidArgument.
SpaceId(&'a Id)
Join a public Space directly by its JMAP id.
Precondition: must be a non-empty Id. Id::from is the
lenient constructor and accepts any string including "";
Id::new_validated is the strict one. An empty Id forwards to
the server unchanged, which rejects it with invalidArguments.
Construct Ids via the validating path when the value comes from
untrusted input.