add get_{ref,mut} for TokioAdapter

pull/91/head
amesgen 4 years ago committed by Sebastian Dröge
parent 36d1ab22f1
commit d28799bc12
  1. 10
      src/tokio.rs

@ -402,6 +402,16 @@ impl<T> TokioAdapter<T> {
pub fn into_inner(self) -> T { pub fn into_inner(self) -> T {
self.inner self.inner
} }
/// Get a reference to the underlying value.
pub fn get_ref(&self) -> &T {
&self.inner
}
/// Get a mutable reference to the underlying value.
pub fn get_mut(&mut self) -> &mut T {
&mut self.inner
}
} }
impl<T: tokio::io::AsyncRead> AsyncRead for TokioAdapter<T> { impl<T: tokio::io::AsyncRead> AsyncRead for TokioAdapter<T> {

Loading…
Cancel
Save