From 623ce443d89cd9ffa2c1adae8d2eb75538802d01 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 24 Oct 2016 20:03:27 -0700 Subject: [PATCH] Add some warning comments --- src/easy.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/easy.rs b/src/easy.rs index 47fd2b072..843b44882 100644 --- a/src/easy.rs +++ b/src/easy.rs @@ -336,16 +336,29 @@ impl EasyFramed } /// Returns a reference to the underlying I/O stream wrapped by `EasyFramed`. + /// + /// Note that care should be taken to not tamper with the underlying stream + /// of data coming in as it may corrupt the stream of frames otherwise being + /// worked with. pub fn get_ref(&self) -> &T { &self.upstream } - /// Returns a mutable reference to the underlying I/O stream wrapped by `EasyFramed`. + /// Returns a mutable reference to the underlying I/O stream wrapped by + /// `EasyFramed`. + /// + /// Note that care should be taken to not tamper with the underlying stream + /// of data coming in as it may corrupt the stream of frames otherwise being + /// worked with. pub fn get_mut(&mut self) -> &mut T { &mut self.upstream } /// Consumes the `EasyFramed`, returning its underlying I/O stream. + /// + /// Note that care should be taken to not tamper with the underlying stream + /// of data coming in as it may corrupt the stream of frames otherwise being + /// worked with. pub fn into_inner(self) -> T { self.upstream }