diff --git a/actix-server-config/src/lib.rs b/actix-server-config/src/lib.rs index 6f8f3002..6eccaf4c 100644 --- a/actix-server-config/src/lib.rs +++ b/actix-server-config/src/lib.rs @@ -111,6 +111,20 @@ impl Io { } } +impl std::ops::Deref for Io { + type Target = T; + + fn deref(&self) -> &T { + &self.io + } +} + +impl std::ops::DerefMut for Io { + fn deref_mut(&mut self) -> &mut T { + &mut self.io + } +} + impl fmt::Debug for Io { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "Io {{{:?}}}", self.io)