Open mulmarta opened 2 weeks ago
Part of #211
We will have a function that parses an MLSMessage and outputs information needed to fetch the right data from storage.
pub enum MlsMessageDescription<'a> { Welcome { key_package_refs: &'a [KeyPackageRef], cipher_suite: CipherSuite, }, ProtocolMessage { group_id: &'a [u8], epoch_id: u64, content_type: ContentType, // commit, proposal, or application }, // Processing GroupInfo and KeyPackage does not require any storage GroupInfo, KeyPackage, } impl<'a> From<&'a MlsMessage> for MlsMessageDescription<'a> { ... } impl MlsMessage { fn description(&self) -> MlsMessageDescription { .... } }
Seems odd that we would need an object to own the conversion function. Would this have any major problems?
impl From<&MlsMessage> for ParsedMessage { ... }
Yes that's much better.
Background
Part of #211
Parse Message
We will have a function that parses an MLSMessage and outputs information needed to fetch the right data from storage.