aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/encoding/mod.rs')
-rw-r--r--src/encoding/mod.rs9
1 files changed, 9 insertions, 0 deletions
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,
+ }
+ }
+}