diff --git a/src/easy.rs b/src/easy.rs index cab11d003..47fd2b072 100644 --- a/src/easy.rs +++ b/src/easy.rs @@ -334,6 +334,21 @@ impl EasyFramed wr: Vec::with_capacity(8 * 1024), } } + + /// Returns a reference to the underlying I/O stream wrapped by `EasyFramed`. + pub fn get_ref(&self) -> &T { + &self.upstream + } + + /// Returns a mutable reference to the underlying I/O stream wrapped by `EasyFramed`. + pub fn get_mut(&mut self) -> &mut T { + &mut self.upstream + } + + /// Consumes the `EasyFramed`, returning its underlying I/O stream. + pub fn into_inner(self) -> T { + self.upstream + } } impl FramedIo for EasyFramed