gstreamer/
stream.rs

1// Take a look at the license at the top of the repository in the LICENSE file.
2
3use std::fmt;
4
5use crate::Stream;
6
7impl Stream {
8    pub fn debug(&self) -> Debug {
9        Debug(self)
10    }
11}
12
13pub struct Debug<'a>(&'a Stream);
14
15impl fmt::Debug for Debug<'_> {
16    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17        f.debug_struct("Stream")
18            .field("stream_id", &self.0.stream_id())
19            .field("stream_type", &self.0.stream_type())
20            .field("stream_flags", &self.0.stream_flags())
21            .field("caps", &self.0.caps())
22            .field("tags", &self.0.tags())
23            .finish()
24    }
25}