mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +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 {
|
||||
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>
|
||||
|
||||
Reference in New Issue
Block a user