2020-12-15 10:53:31 +00:00
|
|
|
// Take a look at the license at the top of the repository in the LICENSE file.
|
2018-05-09 09:20:59 +00:00
|
|
|
|
2020-04-14 17:29:43 +00:00
|
|
|
use std::fmt;
|
2018-05-09 09:20:59 +00:00
|
|
|
|
2023-01-03 18:58:25 +00:00
|
|
|
use crate::Stream;
|
|
|
|
|
2018-05-09 09:20:59 +00:00
|
|
|
impl Stream {
|
2020-04-14 17:29:43 +00:00
|
|
|
pub fn debug(&self) -> Debug {
|
|
|
|
Debug(self)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pub struct Debug<'a>(&'a Stream);
|
|
|
|
|
|
|
|
impl<'a> fmt::Debug for Debug<'a> {
|
|
|
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
|
|
f.debug_struct("Stream")
|
2021-04-11 19:39:50 +00:00
|
|
|
.field("stream_id", &self.0.stream_id())
|
|
|
|
.field("stream_type", &self.0.stream_type())
|
|
|
|
.field("stream_flags", &self.0.stream_flags())
|
|
|
|
.field("caps", &self.0.caps())
|
|
|
|
.field("tags", &self.0.tags())
|
2020-04-14 17:29:43 +00:00
|
|
|
.finish()
|
|
|
|
}
|
2018-05-09 09:20:59 +00:00
|
|
|
}
|