mirror of
https://github.com/openharmony/third_party_rust_hyper-tls.git
synced 2026-07-19 16:44:00 -04:00
Add get_ref/get_mut for TlsStream (#37)
This commit is contained in:
@@ -128,6 +128,19 @@ impl<T> TlsStream<T> {
|
||||
inner,
|
||||
}
|
||||
}
|
||||
|
||||
/// Get access to the internal `native_tls::TlsStream` stream which also
|
||||
/// transitively allows access to `T`.
|
||||
pub fn get_ref(&self) -> &native_tls::TlsStream<T> {
|
||||
&self.inner
|
||||
}
|
||||
|
||||
|
||||
/// Get mutable access to the internal `native_tls::TlsStream` stream which
|
||||
/// also transitively allows mutable access to `T`.
|
||||
pub fn get_mut(&mut self) -> &mut native_tls::TlsStream<T> {
|
||||
&mut self.inner
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: fmt::Debug> fmt::Debug for TlsStream<T> {
|
||||
|
||||
Reference in New Issue
Block a user