From 7aa211a8d7ae2efeebd9362699a1aea4b5690e3d Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sat, 6 Jul 2024 17:37:35 +0200 Subject: start on sdp impl --- src/encoding/mod.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/encoding/mod.rs') diff --git a/src/encoding/mod.rs b/src/encoding/mod.rs index f0796c8..816aa01 100644 --- a/src/encoding/mod.rs +++ b/src/encoding/mod.rs @@ -35,3 +35,12 @@ impl FromStr for Message { } } } + +impl Message { + pub fn body_mut(&mut self) -> &mut String { + match self { + Message::Request(r) => &mut r.body, + Message::Response(r) => &mut r.body, + } + } +} -- cgit v1.2.3-70-g09d2