pub struct WelcomeMessage {
pub group_id: GroupId,
pub welcome_data: Vec<u8>,
pub inviter_id: String,
pub group_name: Option<String>,
pub timestamp_ms: u64,
}Expand description
The sealed-envelope types, re-exported so that every path into them keeps working and there is still exactly one definition of each.
They live in offline-protocol-sealed because a leaf node encodes and
decodes the same envelope this crate does, and cannot link this crate:
this one is built on OpenMLS, which needs std. See ADR 0022.
A Welcome message for inviting users to a group.
A leaf node joins its pair from one of these, which is why it lives beside the envelope rather than with the group-management types in the MLS crate.
Fields§
§group_id: GroupIdThe group ID the user is being invited to.
welcome_data: Vec<u8>Serialized MLS Welcome message bytes.
inviter_id: StringThe inviter’s user ID.
group_name: Option<String>Optional group name for display.
timestamp_ms: u64Timestamp when the welcome was created.
Implementations§
Source§impl WelcomeMessage
impl WelcomeMessage
Sourcepub fn to_base64(&self) -> Result<String, SealedError>
pub fn to_base64(&self) -> Result<String, SealedError>
Encodes the welcome message to base64 for transport.
Sourcepub fn from_base64(encoded: &str) -> Result<WelcomeMessage, SealedError>
pub fn from_base64(encoded: &str) -> Result<WelcomeMessage, SealedError>
Decodes a welcome message from base64.
Trait Implementations§
Source§impl Clone for WelcomeMessage
impl Clone for WelcomeMessage
Source§fn clone(&self) -> WelcomeMessage
fn clone(&self) -> WelcomeMessage
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 WelcomeMessage
impl Debug for WelcomeMessage
Source§impl<'de> Deserialize<'de> for WelcomeMessage
impl<'de> Deserialize<'de> for WelcomeMessage
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<WelcomeMessage, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<WelcomeMessage, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for WelcomeMessage
impl Serialize for WelcomeMessage
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for WelcomeMessage
impl RefUnwindSafe for WelcomeMessage
impl Send for WelcomeMessage
impl Sync for WelcomeMessage
impl Unpin for WelcomeMessage
impl UnsafeUnpin for WelcomeMessage
impl UnwindSafe for WelcomeMessage
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,
Source§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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