diff --git a/src/framed.rs b/src/framed.rs index 3b69e017..5f1904d7 100644 --- a/src/framed.rs +++ b/src/framed.rs @@ -219,6 +219,29 @@ where flushed: true, } } + + /// Get reference to a service wrapped by `FramedTransport` instance. + pub fn get_ref(&self) -> &S { + &self.service + } + + /// Get mutable reference to a service wrapped by `FramedTransport` + /// instance. + pub fn get_mut(&mut self) -> &mut S { + &mut self.service + } + + /// Get reference to a framed instance wrapped by `FramedTransport` + /// instance. + pub fn get_framed(&self) -> &Framed { + &self.framed + } + + /// Get mutable reference to a framed instance wrapped by `FramedTransport` + /// instance. + pub fn get_framed_mut(&mut self) -> &mut Framed { + &mut self.framed + } } impl FramedTransport