Struct client::member::InvitePayload
zaun_community_protocol::client::member::InvitePayload · Struct
pub struct InvitePayload { … }The canonical InvitePayload. Unsigned: after connecting, the welcome must show a
descriptor deriving community_id, a delegation naming host_id, and a host proof —
which InvitePayload::session_config makes the session check.
Debug never shows the secret (InviteSecret is redacted); it is zeroized on drop.
Fields
Section titled “Fields”community_id: CommunityId
Section titled “community_id: CommunityId”The community.
host_id: HostId
Section titled “host_id: HostId”The host to connect to.
host_address: String
Section titled “host_address: String”The host’s SimpleX contact address, ≤ 2 048 bytes.
invite_secret: InviteSecret
Section titled “invite_secret: InviteSecret”The invitation secret.
expires_at: Option<u64>
Section titled “expires_at: Option<u64>”Expiry, ms; none = never.
protocol_min: u16
Section titled “protocol_min: u16”Lowest protocol version of the community.
protocol_max: u16
Section titled “protocol_max: u16”Highest protocol version of the community.
Methods
Section titled “Methods”pub fn parse(link: &str) -> Result<Self, LinkError>Parses a link strictly: prefix, canonical base64url, canonical payload, no trailing bytes. Decoded bytes are zeroized.
Errors
Section titled “Errors”LinkError, which never echoes the input.
to_link
Section titled “to_link”pub fn to_link(&self) -> Result<InviteLink, LinkError>Formats the link. The intermediate bytes are zeroized; the returned link is redacted
in Debug.
Errors
Section titled “Errors”LinkError::Field for an empty or oversized address or a bad version range.
is_expired
Section titled “is_expired”pub fn is_expired(&self, now_ms: u64) -> boolWhether the invitation has expired at now_ms.
supports
Section titled “supports”pub const fn supports(&self, ours: VersionRange) -> boolWhether the community’s version range overlaps ours.
session_config
Section titled “session_config”pub fn session_config(&self) -> SessionConfigA session configuration that pins the link’s host and community.
Trait implementations
Section titled “Trait implementations”Clone, Debug, Eq, PartialEq, StructuralPartialEq