diff --git a/io/src/lib.rs b/io/src/lib.rs index 9770f6ce8..35e12b631 100644 --- a/io/src/lib.rs +++ b/io/src/lib.rs @@ -224,6 +224,19 @@ impl> Cursor { /// /// This is the whole wrapped buffer, including the bytes already read. #[inline] + pub fn get_ref(&self) -> &T { &self.inner } + + /// Returns a mutable reference to the inner buffer. + /// + /// This is the whole wrapped buffer, including the bytes already read. + #[inline] + pub fn get_mut(&mut self) -> &mut T { &mut self.inner } + + /// Returns a reference to the inner buffer. + /// + /// This is the whole wrapped buffer, including the bytes already read. + #[inline] + #[deprecated(since = "TBD", note = "use `get_ref()` instead")] pub fn inner(&self) -> &T { &self.inner } }