mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
chore(net): add helper access functions for wrapped stream (#216)
This commit is contained in:
@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user