use crate::conn::Connection; use crate::conn::ConnectionExt; use alloc::boxed::Box; impl Connection for Box> { type Error = E; fn write(&mut self, byte: u8) -> Result<(), Self::Error> { (**self).write(byte) } fn write_all(&mut self, buf: &[u8]) -> Result<(), Self::Error> { (**self).write_all(buf) } fn flush(&mut self) -> Result<(), Self::Error> { (**self).flush() } fn on_session_start(&mut self) -> Result<(), Self::Error> { (**self).on_session_start() } } impl Connection for Box> { type Error = E; fn write(&mut self, byte: u8) -> Result<(), Self::Error> { (**self).write(byte) } fn write_all(&mut self, buf: &[u8]) -> Result<(), Self::Error> { (**self).write_all(buf) } fn flush(&mut self) -> Result<(), Self::Error> { (**self).flush() } fn on_session_start(&mut self) -> Result<(), Self::Error> { (**self).on_session_start() } } impl ConnectionExt for Box> { fn read(&mut self) -> Result { (**self).read() } fn peek(&mut self) -> Result, Self::Error> { (**self).peek() } }