refactor: Rename `MlsPlaintext::content` to `body_content`.
This is needed to make room for a new `content` field. (Next commit.)
@@ -54,7 +54,7 @@ pub(crate) struct MlsPlaintext {
sender: Sender,
authenticated_data: TlsByteVecU32,
content_type: ContentType,
- content: MlsContentBody,
+ body_content: MlsContentBody,
signature: Signature,
confirmation_tag: Option<ConfirmationTag>,
membership_tag: Option<MembershipTag>,
@@ -70,7 +70,7 @@ pub(crate) enum MlsContentBody {
impl From<MlsPlaintext> for MlsContentBody {
fn from(plaintext: MlsPlaintext) -> Self {
- plaintext.content
+ plaintext.body_content
}
}
@@ -96,7 +96,7 @@ impl MlsPlaintext {
#[cfg(test)]
pub(super) fn set_content(&mut self, content: MlsContentBody) {
- self.content = content;
+ self.body_content = content;
}
// TODO: #727 - Remove if not needed.
@@ -256,7 +256,7 @@ impl MlsPlaintext {
/// Returns a reference to the `content` field.
pub(crate) fn content(&self) -> &MlsContentBody {
- &self.content
+ &self.body_content
}
/// Get the content type of this message.
@@ -444,7 +444,7 @@ fn encode_tbs<'a>(
&plaintext.sender,
&plaintext.authenticated_data,
&plaintext.content_type,
- &plaintext.content,
+ &plaintext.body_content,
&mut out,
)?;
Ok(out)
@@ -716,7 +716,7 @@ impl MlsPlaintextTbs {
sender: mls_plaintext.sender,
authenticated_data: mls_plaintext.authenticated_data,
content_type: mls_plaintext.content_type,
- payload: mls_plaintext.content,
+ payload: mls_plaintext.body_content,
}
}
@@ -754,7 +754,7 @@ impl VerifiedStruct<VerifiableMlsPlaintext> for MlsPlaintext {
sender: v.tbs.sender,
authenticated_data: v.tbs.authenticated_data,
content_type: v.tbs.content_type,
- content: v.tbs.payload,
+ body_content: v.tbs.payload,
signature: v.signature,
confirmation_tag: v.confirmation_tag,
membership_tag: v.membership_tag,
@@ -773,7 +773,7 @@ impl SignedStruct<MlsPlaintextTbs> for MlsPlaintext {
sender: tbs.sender,
authenticated_data: tbs.authenticated_data,
content_type: tbs.content_type,
- content: tbs.payload,
+ body_content: tbs.payload,
signature,
// Tags must always be added after the signature
confirmation_tag: None,
@@ -798,7 +798,7 @@ impl<'a> TryFrom<&'a MlsPlaintext> for MlsPlaintextCommitContent<'a> {
type Error = &'static str;
fn try_from(mls_plaintext: &'a MlsPlaintext) -> Result<Self, Self::Error> {
- let commit = match &mls_plaintext.content {
+ let commit = match &mls_plaintext.body_content {
MlsContentBody::Commit(commit) => commit,
_ => return Err("MlsPlaintext needs to contain a Commit."),
};
