refactor: move `MlsContentBody`.
This will be used later so that `MlsContent` is followed by `MlsContentBody`.
@@ -60,6 +60,20 @@ pub(crate) struct MlsPlaintext {
membership_tag: Option<MembershipTag>,
}
+#[allow(clippy::large_enum_variant)]
+#[derive(Debug, PartialEq, Clone, Serialize, Deserialize)]
+pub(crate) enum MlsContentBody {
+ Application(TlsByteVecU32),
+ Proposal(Proposal),
+ Commit(Commit),
+}
+
+impl From<MlsPlaintext> for MlsContentBody {
+ fn from(plaintext: MlsPlaintext) -> Self {
+ plaintext.content
+ }
+}
+
pub(crate) struct Payload {
pub(crate) payload: MlsContentBody,
pub(crate) content_type: ContentType,
@@ -362,20 +376,6 @@ impl ContentType {
}
}
-#[allow(clippy::large_enum_variant)]
-#[derive(Debug, PartialEq, Clone, Serialize, Deserialize)]
-pub(crate) enum MlsContentBody {
- Application(TlsByteVecU32),
- Proposal(Proposal),
- Commit(Commit),
-}
-
-impl From<MlsPlaintext> for MlsContentBody {
- fn from(plaintext: MlsPlaintext) -> Self {
- plaintext.content
- }
-}
-
/// 9.1 Content Authentication
///
/// ```c
