File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed
Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -157,6 +157,17 @@ where
157157 }
158158 }
159159
160+ /// Get the wrapped [`RawStream`]
161+ #[ inline]
162+ pub fn as_inner ( & self ) -> & S {
163+ match & self . inner {
164+ StreamInner :: PassThrough ( w) => w,
165+ StreamInner :: Strip ( w) => w. as_inner ( ) ,
166+ #[ cfg( all( windows, feature = "wincon" ) ) ]
167+ StreamInner :: Wincon ( w) => w. as_inner ( ) ,
168+ }
169+ }
170+
160171 /// Returns `true` if the descriptor/handle refers to a terminal/tty.
161172 #[ inline]
162173 pub fn is_terminal ( & self ) -> bool {
Original file line number Diff line number Diff line change 3030 pub fn into_inner ( self ) -> S {
3131 self . raw
3232 }
33+
34+ /// Get the wrapped [`std::io::Write`]
35+ #[ inline]
36+ pub fn as_inner ( & self ) -> & S {
37+ & self . raw
38+ }
3339}
3440
3541impl < S > StripStream < S >
Original file line number Diff line number Diff line change 3434 pub fn into_inner ( self ) -> S {
3535 self . raw
3636 }
37+
38+ /// Get the wrapped [`std::io::Write`]
39+ #[ inline]
40+ pub fn as_inner ( & self ) -> & S {
41+ & self . raw
42+ }
3743}
3844
3945impl < S > WinconStream < S >
You can’t perform that action at this time.
0 commit comments