pub struct InvitePayload {
pub room_owner_vk: VerifyingKey,
pub invitation_payload: Vec<u8>,
pub personal_message: Option<String>,
}Expand description
Inner shape of DirectMessageBody::Invite.
invitation_payload is the CBOR-encoded
ui::components::members::Invitation (the same bytes that get
base58-encoded as the ?invitation=… URL parameter). Encoding it as
CBOR bytes here (rather than the base58 string form) saves the
encode-decode round-trip on the recipient side and keeps the wire
body smaller — base58 is a 1.37x expansion.
room_owner_vk redundantly carries the target room’s owner key so
a client can show a “you’re invited to room X” affordance without
first round-tripping the payload through Invitation decode. It MUST
match what the payload’s invitation deserialises to; the recipient
SHOULD reject mismatches as malformed.
Fields§
§room_owner_vk: VerifyingKeyOwner verifying-key of the target room. Cheap to inspect
without decoding invitation_payload.
invitation_payload: Vec<u8>CBOR-encoded Invitation (room + invitee signing key +
authorised member). Same bytes that would otherwise be
base58-encoded as the ?invitation=… URL parameter.
personal_message: Option<String>Optional sender-typed message rendered above the Accept
button. None means “no extra text”; the recipient SHOULD
hide the message box entirely in that case rather than
rendering an empty line.
Trait Implementations§
Source§impl Clone for InvitePayload
impl Clone for InvitePayload
Source§fn clone(&self) -> InvitePayload
fn clone(&self) -> InvitePayload
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 InvitePayload
impl Debug for InvitePayload
Source§impl<'de> Deserialize<'de> for InvitePayload
impl<'de> Deserialize<'de> for InvitePayload
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for InvitePayload
impl PartialEq for InvitePayload
Source§fn eq(&self, other: &InvitePayload) -> bool
fn eq(&self, other: &InvitePayload) -> bool
self and other values to be equal, and is used by ==.