chore(net): add helper access functions for wrapped stream (#216)

This commit is contained in:
Matthias Seitz
2022-11-16 20:11:47 +01:00
committed by GitHub
parent 3ffc0da7c8
commit 814640cccd

View File

@ -130,6 +130,16 @@ impl<S> EthStream<S> {
pub fn new(inner: S) -> Self { pub fn new(inner: S) -> Self {
Self { inner } Self { inner }
} }
/// Returns the underlying stream.
pub fn inner(&self) -> &S {
&self.inner
}
/// Returns mutable access to the underlying stream.
pub fn inner_mut(&mut self) -> &mut S {
&mut self.inner
}
} }
impl<S, E> Stream for EthStream<S> impl<S, E> Stream for EthStream<S>