/src/mp4san/common/src/error.rs
Line | Count | Source |
1 | | //! Error types returned by the public API. |
2 | | |
3 | | use std::any::type_name; |
4 | | use std::fmt; |
5 | | use std::fmt::{Debug, Display}; |
6 | | use std::io; |
7 | | use std::panic::Location; |
8 | | use std::result::Result as StdResult; |
9 | | |
10 | | use derive_more::Display; |
11 | | |
12 | | // |
13 | | // public types |
14 | | // |
15 | | |
16 | | /// Error type returned by `mediasan`. |
17 | | #[derive(Debug, thiserror::Error)] |
18 | | pub enum Error<E: ReportableError> { |
19 | | /// An IO error occurred while reading the given input. |
20 | | #[error("IO error: {0}")] |
21 | | Io(#[from] io::Error), |
22 | | |
23 | | /// The input could not be parsed as a media file. |
24 | | #[error("Parse error: {0}")] |
25 | | Parse(#[from] Report<E>), |
26 | | } |
27 | | |
28 | | /// A report with additional debugging info for an error. |
29 | | /// |
30 | | /// A `Report<E>` can be used to identify exactly where the error `E` occurred in `mediasan`. The [`Debug`] |
31 | | /// implementation will print a human-readable parser stack trace. The underlying error of type `E` can also be |
32 | | /// retrieved e.g. for matching against with [`get_ref`](Self::get_ref) or [`into_inner`](Self::into_inner). |
33 | | #[derive(thiserror::Error)] |
34 | | #[error("{error}")] |
35 | | pub struct Report<E: ReportableError> { |
36 | | #[source] |
37 | | error: E, |
38 | | stack: E::Stack, |
39 | | } |
40 | | |
41 | | /// A [`Display`]-able indicating there was extra trailing input after parsing. |
42 | | #[derive(Clone, Copy, Debug, Display)] |
43 | | #[display("extra unparsed input")] |
44 | | pub struct ExtraUnparsedInput; |
45 | | |
46 | | /// A [`Display`]-able indicating an error occurred while parsing a certain type. |
47 | | #[derive(Clone, Copy, Debug, Display)] |
48 | | #[display("while parsing value of type `{}`", _0)] |
49 | | pub struct WhileParsingType(&'static str); |
50 | | |
51 | | /// A convenience type alias for a [`Result`](std::result::Result) containing an error wrapped by a [`Report`]. |
52 | | pub type Result<T, E> = StdResult<T, Report<E>>; |
53 | | |
54 | | /// An trait providing [`Report`]-related extensions for [`Result`](std::result::Result). |
55 | | pub trait ResultExt: Sized { |
56 | | #[track_caller] |
57 | | /// Attach a [`Display`]-able type to the error [`Report`]'s stack trace. |
58 | | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self; |
59 | | |
60 | | #[track_caller] |
61 | | /// Attach the message "while parsing type T" to the error [`Report`]'s stack trace. |
62 | | fn while_parsing_type(self) -> Self; |
63 | | } |
64 | | |
65 | | /// An error stack. |
66 | | pub struct ReportStack { |
67 | | location: &'static Location<'static>, |
68 | | entries: Vec<ReportEntry>, |
69 | | } |
70 | | |
71 | | /// A null error stack which ignores all data attached to it. |
72 | | #[derive(Clone, Copy, Debug, Display)] |
73 | | #[display("")] |
74 | | pub struct NullReportStack; |
75 | | |
76 | | /// A trait for error types which can be used in a [`Report`]. |
77 | | pub trait ReportableError: Display { |
78 | | /// The error stack type corresponding to this error. |
79 | | type Stack: ReportableErrorStack; |
80 | | } |
81 | | |
82 | | /// A trait for error stack types for use within a [`Report`]. |
83 | | pub trait ReportableErrorStack: Display { |
84 | | #[track_caller] |
85 | | /// Construct a new instance of [`Self`]. |
86 | | fn new() -> Self; |
87 | | |
88 | | #[track_caller] |
89 | | /// Attach a [`Display`]-able type to the error [`Report`]'s stack trace. |
90 | | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self; |
91 | | } |
92 | | |
93 | | // |
94 | | // private types |
95 | | // |
96 | | |
97 | | #[derive(derive_more::Display)] |
98 | | #[display("{message} at {location}")] |
99 | | struct ReportEntry { |
100 | | message: Box<dyn Display + Send + Sync + 'static>, |
101 | | location: &'static Location<'static>, |
102 | | } |
103 | | |
104 | | // |
105 | | // Report impls |
106 | | // |
107 | | |
108 | | impl<E: ReportableError> Report<E> { |
109 | | /// Get a reference to the underlying error. |
110 | 0 | pub fn get_ref(&self) -> &E { |
111 | 0 | &self.error |
112 | 0 | } Unexecuted instantiation: <mediasan_common::error::Report<_>>::get_ref Unexecuted instantiation: <mediasan_common::error::Report<_>>::get_ref |
113 | | |
114 | | /// Unwrap this report, returning the underlying error. |
115 | 0 | pub fn into_inner(self) -> E { |
116 | 0 | self.error |
117 | 0 | } Unexecuted instantiation: <mediasan_common::error::Report<webpsan::parse::error::ParseError>>::into_inner Unexecuted instantiation: <mediasan_common::error::Report<_>>::into_inner Unexecuted instantiation: <mediasan_common::error::Report<_>>::into_inner |
118 | | |
119 | | #[track_caller] |
120 | | /// Attach a [`Display`]-able type to the stack trace. |
121 | 73.9k | pub fn attach_printable<P: Display + Send + Sync + 'static>(mut self, message: P) -> Self { |
122 | 73.9k | self.stack = self.stack.attach_printable(message); |
123 | 73.9k | self |
124 | 73.9k | } <mediasan_common::error::Report<webpsan::parse::error::ParseError>>::attach_printable::<webpsan::parse::error::WhileParsingField<&str>> Line | Count | Source | 121 | 50 | pub fn attach_printable<P: Display + Send + Sync + 'static>(mut self, message: P) -> Self { | 122 | 50 | self.stack = self.stack.attach_printable(message); | 123 | 50 | self | 124 | 50 | } |
<mediasan_common::error::Report<webpsan::parse::error::ParseError>>::attach_printable::<mediasan_common::error::WhileParsingType> Line | Count | Source | 121 | 16.8k | pub fn attach_printable<P: Display + Send + Sync + 'static>(mut self, message: P) -> Self { | 122 | 16.8k | self.stack = self.stack.attach_printable(message); | 123 | 16.8k | self | 124 | 16.8k | } |
<mediasan_common::error::Report<webpsan::parse::error::ParseError>>::attach_printable::<mediasan_common::error::ExtraUnparsedInput> Line | Count | Source | 121 | 113 | pub fn attach_printable<P: Display + Send + Sync + 'static>(mut self, message: P) -> Self { | 122 | 113 | self.stack = self.stack.attach_printable(message); | 123 | 113 | self | 124 | 113 | } |
<mediasan_common::error::Report<webpsan::parse::error::ParseError>>::attach_printable::<webpsan::parse::error::ExpectedChunk> Line | Count | Source | 121 | 140 | pub fn attach_printable<P: Display + Send + Sync + 'static>(mut self, message: P) -> Self { | 122 | 140 | self.stack = self.stack.attach_printable(message); | 123 | 140 | self | 124 | 140 | } |
<mediasan_common::error::Report<webpsan::parse::error::ParseError>>::attach_printable::<webpsan::parse::error::MultipleChunks> Line | Count | Source | 121 | 42 | pub fn attach_printable<P: Display + Send + Sync + 'static>(mut self, message: P) -> Self { | 122 | 42 | self.stack = self.stack.attach_printable(message); | 123 | 42 | self | 124 | 42 | } |
<mediasan_common::error::Report<webpsan::parse::error::ParseError>>::attach_printable::<webpsan::parse::error::WhileParsingChunk> Line | Count | Source | 121 | 1.11k | pub fn attach_printable<P: Display + Send + Sync + 'static>(mut self, message: P) -> Self { | 122 | 1.11k | self.stack = self.stack.attach_printable(message); | 123 | 1.11k | self | 124 | 1.11k | } |
<mediasan_common::error::Report<webpsan::parse::error::ParseError>>::attach_printable::<webpsan::FrameDimensionsMismatch> Line | Count | Source | 121 | 109 | pub fn attach_printable<P: Display + Send + Sync + 'static>(mut self, message: P) -> Self { | 122 | 109 | self.stack = self.stack.attach_printable(message); | 123 | 109 | self | 124 | 109 | } |
<mediasan_common::error::Report<webpsan::parse::error::ParseError>>::attach_printable::<webpsan::parse::vp8l::InvalidSignature> Line | Count | Source | 121 | 15 | pub fn attach_printable<P: Display + Send + Sync + 'static>(mut self, message: P) -> Self { | 122 | 15 | self.stack = self.stack.attach_printable(message); | 123 | 15 | self | 124 | 15 | } |
<mediasan_common::error::Report<webpsan::parse::error::ParseError>>::attach_printable::<webpsan::parse::lossless::InvalidPredictor> Line | Count | Source | 121 | 29 | pub fn attach_printable<P: Display + Send + Sync + 'static>(mut self, message: P) -> Self { | 122 | 29 | self.stack = self.stack.attach_printable(message); | 123 | 29 | self | 124 | 29 | } |
<mediasan_common::error::Report<webpsan::parse::error::ParseError>>::attach_printable::<webpsan::parse::lossless::InvalidSymbolCount> Line | Count | Source | 121 | 132 | pub fn attach_printable<P: Display + Send + Sync + 'static>(mut self, message: P) -> Self { | 122 | 132 | self.stack = self.stack.attach_printable(message); | 123 | 132 | self | 124 | 132 | } |
<mediasan_common::error::Report<webpsan::parse::error::ParseError>>::attach_printable::<webpsan::parse::lossless::InvalidBackRefLength> Line | Count | Source | 121 | 84 | pub fn attach_printable<P: Display + Send + Sync + 'static>(mut self, message: P) -> Self { | 122 | 84 | self.stack = self.stack.attach_printable(message); | 123 | 84 | self | 124 | 84 | } |
<mediasan_common::error::Report<webpsan::parse::error::ParseError>>::attach_printable::<webpsan::parse::lossless::InvalidColorCacheSize> Line | Count | Source | 121 | 69 | pub fn attach_printable<P: Display + Send + Sync + 'static>(mut self, message: P) -> Self { | 122 | 69 | self.stack = self.stack.attach_printable(message); | 123 | 69 | self | 124 | 69 | } |
<mediasan_common::error::Report<webpsan::parse::error::ParseError>>::attach_printable::<webpsan::parse::lossless::WhileParsingTransform> Line | Count | Source | 121 | 1.63k | pub fn attach_printable<P: Display + Send + Sync + 'static>(mut self, message: P) -> Self { | 122 | 1.63k | self.stack = self.stack.attach_printable(message); | 123 | 1.63k | self | 124 | 1.63k | } |
<mediasan_common::error::Report<webpsan::parse::error::ParseError>>::attach_printable::<webpsan::parse::lossless::InvalidBackRefDistance> Line | Count | Source | 121 | 138 | pub fn attach_printable<P: Display + Send + Sync + 'static>(mut self, message: P) -> Self { | 122 | 138 | self.stack = self.stack.attach_printable(message); | 123 | 138 | self | 124 | 138 | } |
<mediasan_common::error::Report<webpsan::parse::error::ParseError>>::attach_printable::<webpsan::parse::lossless::InvalidDuplicateTransform> Line | Count | Source | 121 | 31 | pub fn attach_printable<P: Display + Send + Sync + 'static>(mut self, message: P) -> Self { | 122 | 31 | self.stack = self.stack.attach_printable(message); | 123 | 31 | self | 124 | 31 | } |
Unexecuted instantiation: <mediasan_common::error::Report<webpsan::parse::error::ParseError>>::attach_printable::<webpsan::parse::lossless::ColorCacheIndexOutOfBounds> <mediasan_common::error::Report<webpsan::parse::error::ParseError>>::attach_printable::<webpsan::parse::lossless::InvalidCodeLengthRepetition> Line | Count | Source | 121 | 118 | pub fn attach_printable<P: Display + Send + Sync + 'static>(mut self, message: P) -> Self { | 122 | 118 | self.stack = self.stack.attach_printable(message); | 123 | 118 | self | 124 | 118 | } |
<mediasan_common::error::Report<webpsan::parse::error::ParseError>>::attach_printable::<webpsan::parse::bitstream::InvalidLz77PrefixCode> Line | Count | Source | 121 | 8 | pub fn attach_printable<P: Display + Send + Sync + 'static>(mut self, message: P) -> Self { | 122 | 8 | self.stack = self.stack.attach_printable(message); | 123 | 8 | self | 124 | 8 | } |
<mediasan_common::error::Report<webpsan::parse::error::ParseError>>::attach_printable::<bitstream_io::huffman::HuffmanTreeError> Line | Count | Source | 121 | 1.38k | pub fn attach_printable<P: Display + Send + Sync + 'static>(mut self, message: P) -> Self { | 122 | 1.38k | self.stack = self.stack.attach_printable(message); | 123 | 1.38k | self | 124 | 1.38k | } |
<mediasan_common::error::Report<webpsan::parse::error::ParseError>>::attach_printable::<&str> Line | Count | Source | 121 | 4.90k | pub fn attach_printable<P: Display + Send + Sync + 'static>(mut self, message: P) -> Self { | 122 | 4.90k | self.stack = self.stack.attach_printable(message); | 123 | 4.90k | self | 124 | 4.90k | } |
Unexecuted instantiation: <mediasan_common::error::Report<_>>::attach_printable::<_> <mediasan_common::error::Report<mp4san::parse::error::ParseError>>::attach_printable::<mp4san::BoxDataTooLarge> Line | Count | Source | 121 | 222 | pub fn attach_printable<P: Display + Send + Sync + 'static>(mut self, message: P) -> Self { | 122 | 222 | self.stack = self.stack.attach_printable(message); | 123 | 222 | self | 124 | 222 | } |
<mediasan_common::error::Report<mp4san::parse::error::ParseError>>::attach_printable::<mp4san::parse::error::WhileParsingField<&str>> Line | Count | Source | 121 | 6.41k | pub fn attach_printable<P: Display + Send + Sync + 'static>(mut self, message: P) -> Self { | 122 | 6.41k | self.stack = self.stack.attach_printable(message); | 123 | 6.41k | self | 124 | 6.41k | } |
<mediasan_common::error::Report<mp4san::parse::error::ParseError>>::attach_printable::<mediasan_common::error::WhileParsingType> Line | Count | Source | 121 | 13.0k | pub fn attach_printable<P: Display + Send + Sync + 'static>(mut self, message: P) -> Self { | 122 | 13.0k | self.stack = self.stack.attach_printable(message); | 123 | 13.0k | self | 124 | 13.0k | } |
<mediasan_common::error::Report<mp4san::parse::error::ParseError>>::attach_printable::<mp4san::parse::error::MultipleBoxes> Line | Count | Source | 121 | 1.09k | pub fn attach_printable<P: Display + Send + Sync + 'static>(mut self, message: P) -> Self { | 122 | 1.09k | self.stack = self.stack.attach_printable(message); | 123 | 1.09k | self | 124 | 1.09k | } |
<mediasan_common::error::Report<mp4san::parse::error::ParseError>>::attach_printable::<mp4san::parse::error::WhileParsingBox> Line | Count | Source | 121 | 1.86k | pub fn attach_printable<P: Display + Send + Sync + 'static>(mut self, message: P) -> Self { | 122 | 1.86k | self.stack = self.stack.attach_printable(message); | 123 | 1.86k | self | 124 | 1.86k | } |
<mediasan_common::error::Report<mp4san::parse::error::ParseError>>::attach_printable::<mp4san::parse::error::WhileParsingChild> Line | Count | Source | 121 | 15.4k | pub fn attach_printable<P: Display + Send + Sync + 'static>(mut self, message: P) -> Self { | 122 | 15.4k | self.stack = self.stack.attach_printable(message); | 123 | 15.4k | self | 124 | 15.4k | } |
<mediasan_common::error::Report<mp4san::parse::error::ParseError>>::attach_printable::<alloc::string::String> Line | Count | Source | 121 | 618 | pub fn attach_printable<P: Display + Send + Sync + 'static>(mut self, message: P) -> Self { | 122 | 618 | self.stack = self.stack.attach_printable(message); | 123 | 618 | self | 124 | 618 | } |
<mediasan_common::error::Report<mp4san::parse::error::ParseError>>::attach_printable::<&str> Line | Count | Source | 121 | 8.29k | pub fn attach_printable<P: Display + Send + Sync + 'static>(mut self, message: P) -> Self { | 122 | 8.29k | self.stack = self.stack.attach_printable(message); | 123 | 8.29k | self | 124 | 8.29k | } |
Unexecuted instantiation: <mediasan_common::error::Report<_>>::attach_printable::<_> |
125 | | } |
126 | | |
127 | | impl<E: ReportableError> From<E> for Report<E> { |
128 | | #[track_caller] |
129 | 24.9k | fn from(error: E) -> Self { |
130 | 24.9k | Self { error, stack: E::Stack::new() } |
131 | 24.9k | } <mediasan_common::error::Report<webpsan::parse::error::ParseError> as core::convert::From<webpsan::parse::error::ParseError>>::from Line | Count | Source | 129 | 7.25k | fn from(error: E) -> Self { | 130 | 7.25k | Self { error, stack: E::Stack::new() } | 131 | 7.25k | } |
Unexecuted instantiation: <mediasan_common::error::Report<_> as core::convert::From<_>>::from <mediasan_common::error::Report<mp4san::parse::error::ParseError> as core::convert::From<mp4san::parse::error::ParseError>>::from Line | Count | Source | 129 | 17.6k | fn from(error: E) -> Self { | 130 | 17.6k | Self { error, stack: E::Stack::new() } | 131 | 17.6k | } |
Unexecuted instantiation: <mediasan_common::error::Report<_> as core::convert::From<_>>::from |
132 | | } |
133 | | |
134 | | impl<E: ReportableError> Debug for Report<E> { |
135 | 0 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
136 | 0 | let Self { error, stack } = self; |
137 | 0 | write!(f, "{error}{stack}") |
138 | 0 | } Unexecuted instantiation: <mediasan_common::error::Report<_> as core::fmt::Debug>::fmt Unexecuted instantiation: <mediasan_common::error::Report<mp4san::parse::error::ParseError> as core::fmt::Debug>::fmt Unexecuted instantiation: <mediasan_common::error::Report<_> as core::fmt::Debug>::fmt |
139 | | } |
140 | | |
141 | | // |
142 | | // ReportErrorStack impls |
143 | | // |
144 | | |
145 | | // |
146 | | // WhileParsingType impls |
147 | | // |
148 | | |
149 | | impl WhileParsingType { |
150 | | /// Construct a new [`WhileParsingType`] where the type described is `T`. |
151 | 46.2M | pub fn new<T: ?Sized>() -> Self { |
152 | 46.2M | Self(type_name::<T>()) |
153 | 46.2M | } <mediasan_common::error::WhileParsingType>::new::<webpsan::parse::integers::Reserved<3>> Line | Count | Source | 151 | 18 | pub fn new<T: ?Sized>() -> Self { | 152 | 18 | Self(type_name::<T>()) | 153 | 18 | } |
<mediasan_common::error::WhileParsingType>::new::<webpsan::parse::alph::AlphFlags> Line | Count | Source | 151 | 2.40k | pub fn new<T: ?Sized>() -> Self { | 152 | 2.40k | Self(type_name::<T>()) | 153 | 2.40k | } |
<mediasan_common::error::WhileParsingType>::new::<webpsan::parse::anmf::AnmfFlags> Line | Count | Source | 151 | 6.61k | pub fn new<T: ?Sized>() -> Self { | 152 | 6.61k | Self(type_name::<T>()) | 153 | 6.61k | } |
<mediasan_common::error::WhileParsingType>::new::<webpsan::parse::vp8l::Vp8lChunk> Line | Count | Source | 151 | 109 | pub fn new<T: ?Sized>() -> Self { | 152 | 109 | Self(type_name::<T>()) | 153 | 109 | } |
<mediasan_common::error::WhileParsingType>::new::<webpsan::parse::vp8x::Vp8xFlags> Line | Count | Source | 151 | 3.43k | pub fn new<T: ?Sized>() -> Self { | 152 | 3.43k | Self(type_name::<T>()) | 153 | 3.43k | } |
<mediasan_common::error::WhileParsingType>::new::<webpsan::parse::header::ChunkHeader> Line | Count | Source | 151 | 199 | pub fn new<T: ?Sized>() -> Self { | 152 | 199 | Self(type_name::<T>()) | 153 | 199 | } |
<mediasan_common::error::WhileParsingType>::new::<webpsan::parse::header::WebpChunk> Line | Count | Source | 151 | 67 | pub fn new<T: ?Sized>() -> Self { | 152 | 67 | Self(type_name::<T>()) | 153 | 67 | } |
Unexecuted instantiation: <mediasan_common::error::WhileParsingType>::new::<webpsan::parse::integers::OneBasedU24> Unexecuted instantiation: <mediasan_common::error::WhileParsingType>::new::<webpsan::parse::integers::U24> <mediasan_common::error::WhileParsingType>::new::<webpsan::parse::lossless::ColorCache> Line | Count | Source | 151 | 10.0k | pub fn new<T: ?Sized>() -> Self { | 152 | 10.0k | Self(type_name::<T>()) | 153 | 10.0k | } |
<mediasan_common::error::WhileParsingType>::new::<webpsan::parse::lossless::ARBPrefixCode> Line | Count | Source | 151 | 527k | pub fn new<T: ?Sized>() -> Self { | 152 | 527k | Self(type_name::<T>()) | 153 | 527k | } |
<mediasan_common::error::WhileParsingType>::new::<webpsan::parse::lossless::BackReference> Line | Count | Source | 151 | 5.32M | pub fn new<T: ?Sized>() -> Self { | 152 | 5.32M | Self(type_name::<T>()) | 153 | 5.32M | } |
<mediasan_common::error::WhileParsingType>::new::<webpsan::parse::lossless::GreenPrefixCode> Line | Count | Source | 151 | 177k | pub fn new<T: ?Sized>() -> Self { | 152 | 177k | Self(type_name::<T>()) | 153 | 177k | } |
<mediasan_common::error::WhileParsingType>::new::<webpsan::parse::lossless::MetaPrefixCodes> Line | Count | Source | 151 | 4.37k | pub fn new<T: ?Sized>() -> Self { | 152 | 4.37k | Self(type_name::<T>()) | 153 | 4.37k | } |
<mediasan_common::error::WhileParsingType>::new::<webpsan::parse::lossless::PrefixCodeGroup> Line | Count | Source | 151 | 177k | pub fn new<T: ?Sized>() -> Self { | 152 | 177k | Self(type_name::<T>()) | 153 | 177k | } |
<mediasan_common::error::WhileParsingType>::new::<webpsan::parse::lossless::EntropyCodedImage> Line | Count | Source | 151 | 5.65k | pub fn new<T: ?Sized>() -> Self { | 152 | 5.65k | Self(type_name::<T>()) | 153 | 5.65k | } |
<mediasan_common::error::WhileParsingType>::new::<webpsan::parse::lossless::DistancePrefixCode> Line | Count | Source | 151 | 174k | pub fn new<T: ?Sized>() -> Self { | 152 | 174k | Self(type_name::<T>()) | 153 | 174k | } |
<mediasan_common::error::WhileParsingType>::new::<webpsan::parse::lossless::SpatiallyCodedImage> Line | Count | Source | 151 | 4.40k | pub fn new<T: ?Sized>() -> Self { | 152 | 4.40k | Self(type_name::<T>()) | 153 | 4.40k | } |
<mediasan_common::error::WhileParsingType>::new::<webpsan::parse::lossless::Color> Line | Count | Source | 151 | 35.1M | pub fn new<T: ?Sized>() -> Self { | 152 | 35.1M | Self(type_name::<T>()) | 153 | 35.1M | } |
<mediasan_common::error::WhileParsingType>::new::<webpsan::parse::lossless::Transform> Line | Count | Source | 151 | 4.28k | pub fn new<T: ?Sized>() -> Self { | 152 | 4.28k | Self(type_name::<T>()) | 153 | 4.28k | } |
Unexecuted instantiation: <mediasan_common::error::WhileParsingType>::new::<u32> Unexecuted instantiation: <mediasan_common::error::WhileParsingType>::new::<u16> Unexecuted instantiation: <mediasan_common::error::WhileParsingType>::new::<_> <mediasan_common::error::WhileParsingType>::new::<mp4san::parse::ftyp::FtypBox> Line | Count | Source | 151 | 4.32k | pub fn new<T: ?Sized>() -> Self { | 152 | 4.32k | Self(type_name::<T>()) | 153 | 4.32k | } |
<mediasan_common::error::WhileParsingType>::new::<mp4san::parse::moov::MoovBox> Line | Count | Source | 151 | 6.37k | pub fn new<T: ?Sized>() -> Self { | 152 | 6.37k | Self(type_name::<T>()) | 153 | 6.37k | } |
<mediasan_common::error::WhileParsingType>::new::<mp4san::parse::trak::TrakBox> Line | Count | Source | 151 | 40.9k | pub fn new<T: ?Sized>() -> Self { | 152 | 40.9k | Self(type_name::<T>()) | 153 | 40.9k | } |
Unexecuted instantiation: <mediasan_common::error::WhileParsingType>::new::<u64> <mediasan_common::error::WhileParsingType>::new::<[u8; 3]> Line | Count | Source | 151 | 216 | pub fn new<T: ?Sized>() -> Self { | 152 | 216 | Self(type_name::<T>()) | 153 | 216 | } |
<mediasan_common::error::WhileParsingType>::new::<[u8; 4]> Line | Count | Source | 151 | 23 | pub fn new<T: ?Sized>() -> Self { | 152 | 23 | Self(type_name::<T>()) | 153 | 23 | } |
<mediasan_common::error::WhileParsingType>::new::<mp4san::parse::array::BoundedArray<u32, u32>> Line | Count | Source | 151 | 488 | pub fn new<T: ?Sized>() -> Self { | 152 | 488 | Self(type_name::<T>()) | 153 | 488 | } |
<mediasan_common::error::WhileParsingType>::new::<mp4san::parse::array::BoundedArray<u32, u64>> Line | Count | Source | 151 | 495 | pub fn new<T: ?Sized>() -> Self { | 152 | 495 | Self(type_name::<T>()) | 153 | 495 | } |
<mediasan_common::error::WhileParsingType>::new::<mp4san::parse::mp4box::Mp4Box<dyn mp4san::parse::mp4box::ParsedBox>> Line | Count | Source | 151 | 4.47M | pub fn new<T: ?Sized>() -> Self { | 152 | 4.47M | Self(type_name::<T>()) | 153 | 4.47M | } |
<mediasan_common::error::WhileParsingType>::new::<mediasan_common::parse::fourcc::FourCC> Line | Count | Source | 151 | 24.3k | pub fn new<T: ?Sized>() -> Self { | 152 | 24.3k | Self(type_name::<T>()) | 153 | 24.3k | } |
<mediasan_common::error::WhileParsingType>::new::<mp4san::parse::co64::Co64Box> Line | Count | Source | 151 | 13.0k | pub fn new<T: ?Sized>() -> Self { | 152 | 13.0k | Self(type_name::<T>()) | 153 | 13.0k | } |
<mediasan_common::error::WhileParsingType>::new::<mp4san::parse::mdia::MdiaBox> Line | Count | Source | 151 | 32.3k | pub fn new<T: ?Sized>() -> Self { | 152 | 32.3k | Self(type_name::<T>()) | 153 | 32.3k | } |
<mediasan_common::error::WhileParsingType>::new::<mp4san::parse::minf::MinfBox> Line | Count | Source | 151 | 31.1k | pub fn new<T: ?Sized>() -> Self { | 152 | 31.1k | Self(type_name::<T>()) | 153 | 31.1k | } |
<mediasan_common::error::WhileParsingType>::new::<mp4san::parse::stbl::StblBox> Line | Count | Source | 151 | 30.1k | pub fn new<T: ?Sized>() -> Self { | 152 | 30.1k | Self(type_name::<T>()) | 153 | 30.1k | } |
<mediasan_common::error::WhileParsingType>::new::<mp4san::parse::stco::StcoBox> Line | Count | Source | 151 | 15.5k | pub fn new<T: ?Sized>() -> Self { | 152 | 15.5k | Self(type_name::<T>()) | 153 | 15.5k | } |
<mediasan_common::error::WhileParsingType>::new::<u8> Line | Count | Source | 151 | 286 | pub fn new<T: ?Sized>() -> Self { | 152 | 286 | Self(type_name::<T>()) | 153 | 286 | } |
<mediasan_common::error::WhileParsingType>::new::<u32> Line | Count | Source | 151 | 28.0k | pub fn new<T: ?Sized>() -> Self { | 152 | 28.0k | Self(type_name::<T>()) | 153 | 28.0k | } |
Unexecuted instantiation: <mediasan_common::error::WhileParsingType>::new::<_> |
154 | | } |
155 | | |
156 | | // |
157 | | // ReportStack impls |
158 | | // |
159 | | |
160 | | impl Display for ReportStack { |
161 | 0 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
162 | 0 | let Self { location, entries } = self; |
163 | 0 | writeln!(f, " at {location}")?; |
164 | 0 | for entry in &entries[..self.entries.len().saturating_sub(1)] { |
165 | 0 | writeln!(f, " - {entry}")?; |
166 | | } |
167 | 0 | if let Some(entry) = entries.last() { |
168 | 0 | write!(f, " - {entry}")?; |
169 | 0 | } |
170 | 0 | Ok(()) |
171 | 0 | } Unexecuted instantiation: <mediasan_common::error::ReportStack as core::fmt::Display>::fmt Unexecuted instantiation: <mediasan_common::error::ReportStack as core::fmt::Display>::fmt |
172 | | } |
173 | | |
174 | | impl ReportableErrorStack for ReportStack { |
175 | | #[track_caller] |
176 | 24.9k | fn new() -> Self { |
177 | 24.9k | Self { location: Location::caller(), entries: Default::default() } |
178 | 24.9k | } <mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::new Line | Count | Source | 176 | 7.25k | fn new() -> Self { | 177 | 7.25k | Self { location: Location::caller(), entries: Default::default() } | 178 | 7.25k | } |
<mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::new Line | Count | Source | 176 | 17.6k | fn new() -> Self { | 177 | 17.6k | Self { location: Location::caller(), entries: Default::default() } | 178 | 17.6k | } |
|
179 | | |
180 | 73.9k | fn attach_printable<P: Display + Send + Sync + 'static>(mut self, printable: P) -> Self { |
181 | 73.9k | let entry = ReportEntry { message: Box::new(printable), location: Location::caller() }; |
182 | 73.9k | self.entries.push(entry); |
183 | 73.9k | self |
184 | 73.9k | } <mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<webpsan::parse::error::WhileParsingField<&str>> Line | Count | Source | 180 | 50 | fn attach_printable<P: Display + Send + Sync + 'static>(mut self, printable: P) -> Self { | 181 | 50 | let entry = ReportEntry { message: Box::new(printable), location: Location::caller() }; | 182 | 50 | self.entries.push(entry); | 183 | 50 | self | 184 | 50 | } |
<mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<mediasan_common::error::WhileParsingType> Line | Count | Source | 180 | 16.8k | fn attach_printable<P: Display + Send + Sync + 'static>(mut self, printable: P) -> Self { | 181 | 16.8k | let entry = ReportEntry { message: Box::new(printable), location: Location::caller() }; | 182 | 16.8k | self.entries.push(entry); | 183 | 16.8k | self | 184 | 16.8k | } |
<mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<mediasan_common::error::ExtraUnparsedInput> Line | Count | Source | 180 | 113 | fn attach_printable<P: Display + Send + Sync + 'static>(mut self, printable: P) -> Self { | 181 | 113 | let entry = ReportEntry { message: Box::new(printable), location: Location::caller() }; | 182 | 113 | self.entries.push(entry); | 183 | 113 | self | 184 | 113 | } |
<mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<webpsan::FrameDimensionsMismatch> Line | Count | Source | 180 | 109 | fn attach_printable<P: Display + Send + Sync + 'static>(mut self, printable: P) -> Self { | 181 | 109 | let entry = ReportEntry { message: Box::new(printable), location: Location::caller() }; | 182 | 109 | self.entries.push(entry); | 183 | 109 | self | 184 | 109 | } |
<mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<bitstream_io::huffman::HuffmanTreeError> Line | Count | Source | 180 | 1.38k | fn attach_printable<P: Display + Send + Sync + 'static>(mut self, printable: P) -> Self { | 181 | 1.38k | let entry = ReportEntry { message: Box::new(printable), location: Location::caller() }; | 182 | 1.38k | self.entries.push(entry); | 183 | 1.38k | self | 184 | 1.38k | } |
<mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<webpsan::parse::vp8l::InvalidSignature> Line | Count | Source | 180 | 15 | fn attach_printable<P: Display + Send + Sync + 'static>(mut self, printable: P) -> Self { | 181 | 15 | let entry = ReportEntry { message: Box::new(printable), location: Location::caller() }; | 182 | 15 | self.entries.push(entry); | 183 | 15 | self | 184 | 15 | } |
<mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<webpsan::parse::error::ExpectedChunk> Line | Count | Source | 180 | 140 | fn attach_printable<P: Display + Send + Sync + 'static>(mut self, printable: P) -> Self { | 181 | 140 | let entry = ReportEntry { message: Box::new(printable), location: Location::caller() }; | 182 | 140 | self.entries.push(entry); | 183 | 140 | self | 184 | 140 | } |
<mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<webpsan::parse::error::MultipleChunks> Line | Count | Source | 180 | 42 | fn attach_printable<P: Display + Send + Sync + 'static>(mut self, printable: P) -> Self { | 181 | 42 | let entry = ReportEntry { message: Box::new(printable), location: Location::caller() }; | 182 | 42 | self.entries.push(entry); | 183 | 42 | self | 184 | 42 | } |
<mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<webpsan::parse::error::WhileParsingChunk> Line | Count | Source | 180 | 1.11k | fn attach_printable<P: Display + Send + Sync + 'static>(mut self, printable: P) -> Self { | 181 | 1.11k | let entry = ReportEntry { message: Box::new(printable), location: Location::caller() }; | 182 | 1.11k | self.entries.push(entry); | 183 | 1.11k | self | 184 | 1.11k | } |
<mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<webpsan::parse::lossless::InvalidPredictor> Line | Count | Source | 180 | 29 | fn attach_printable<P: Display + Send + Sync + 'static>(mut self, printable: P) -> Self { | 181 | 29 | let entry = ReportEntry { message: Box::new(printable), location: Location::caller() }; | 182 | 29 | self.entries.push(entry); | 183 | 29 | self | 184 | 29 | } |
<mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<webpsan::parse::lossless::InvalidSymbolCount> Line | Count | Source | 180 | 132 | fn attach_printable<P: Display + Send + Sync + 'static>(mut self, printable: P) -> Self { | 181 | 132 | let entry = ReportEntry { message: Box::new(printable), location: Location::caller() }; | 182 | 132 | self.entries.push(entry); | 183 | 132 | self | 184 | 132 | } |
<mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<webpsan::parse::lossless::InvalidBackRefLength> Line | Count | Source | 180 | 84 | fn attach_printable<P: Display + Send + Sync + 'static>(mut self, printable: P) -> Self { | 181 | 84 | let entry = ReportEntry { message: Box::new(printable), location: Location::caller() }; | 182 | 84 | self.entries.push(entry); | 183 | 84 | self | 184 | 84 | } |
<mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<webpsan::parse::lossless::InvalidColorCacheSize> Line | Count | Source | 180 | 69 | fn attach_printable<P: Display + Send + Sync + 'static>(mut self, printable: P) -> Self { | 181 | 69 | let entry = ReportEntry { message: Box::new(printable), location: Location::caller() }; | 182 | 69 | self.entries.push(entry); | 183 | 69 | self | 184 | 69 | } |
<mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<webpsan::parse::lossless::WhileParsingTransform> Line | Count | Source | 180 | 1.63k | fn attach_printable<P: Display + Send + Sync + 'static>(mut self, printable: P) -> Self { | 181 | 1.63k | let entry = ReportEntry { message: Box::new(printable), location: Location::caller() }; | 182 | 1.63k | self.entries.push(entry); | 183 | 1.63k | self | 184 | 1.63k | } |
<mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<webpsan::parse::lossless::InvalidBackRefDistance> Line | Count | Source | 180 | 138 | fn attach_printable<P: Display + Send + Sync + 'static>(mut self, printable: P) -> Self { | 181 | 138 | let entry = ReportEntry { message: Box::new(printable), location: Location::caller() }; | 182 | 138 | self.entries.push(entry); | 183 | 138 | self | 184 | 138 | } |
<mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<webpsan::parse::lossless::InvalidDuplicateTransform> Line | Count | Source | 180 | 31 | fn attach_printable<P: Display + Send + Sync + 'static>(mut self, printable: P) -> Self { | 181 | 31 | let entry = ReportEntry { message: Box::new(printable), location: Location::caller() }; | 182 | 31 | self.entries.push(entry); | 183 | 31 | self | 184 | 31 | } |
Unexecuted instantiation: <mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<webpsan::parse::lossless::ColorCacheIndexOutOfBounds> <mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<webpsan::parse::lossless::InvalidCodeLengthRepetition> Line | Count | Source | 180 | 118 | fn attach_printable<P: Display + Send + Sync + 'static>(mut self, printable: P) -> Self { | 181 | 118 | let entry = ReportEntry { message: Box::new(printable), location: Location::caller() }; | 182 | 118 | self.entries.push(entry); | 183 | 118 | self | 184 | 118 | } |
<mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<webpsan::parse::bitstream::InvalidLz77PrefixCode> Line | Count | Source | 180 | 8 | fn attach_printable<P: Display + Send + Sync + 'static>(mut self, printable: P) -> Self { | 181 | 8 | let entry = ReportEntry { message: Box::new(printable), location: Location::caller() }; | 182 | 8 | self.entries.push(entry); | 183 | 8 | self | 184 | 8 | } |
<mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<&str> Line | Count | Source | 180 | 4.90k | fn attach_printable<P: Display + Send + Sync + 'static>(mut self, printable: P) -> Self { | 181 | 4.90k | let entry = ReportEntry { message: Box::new(printable), location: Location::caller() }; | 182 | 4.90k | self.entries.push(entry); | 183 | 4.90k | self | 184 | 4.90k | } |
Unexecuted instantiation: <mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<_> <mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<mp4san::BoxDataTooLarge> Line | Count | Source | 180 | 222 | fn attach_printable<P: Display + Send + Sync + 'static>(mut self, printable: P) -> Self { | 181 | 222 | let entry = ReportEntry { message: Box::new(printable), location: Location::caller() }; | 182 | 222 | self.entries.push(entry); | 183 | 222 | self | 184 | 222 | } |
<mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<mp4san::parse::error::WhileParsingField<&str>> Line | Count | Source | 180 | 6.41k | fn attach_printable<P: Display + Send + Sync + 'static>(mut self, printable: P) -> Self { | 181 | 6.41k | let entry = ReportEntry { message: Box::new(printable), location: Location::caller() }; | 182 | 6.41k | self.entries.push(entry); | 183 | 6.41k | self | 184 | 6.41k | } |
<mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<mediasan_common::error::WhileParsingType> Line | Count | Source | 180 | 13.0k | fn attach_printable<P: Display + Send + Sync + 'static>(mut self, printable: P) -> Self { | 181 | 13.0k | let entry = ReportEntry { message: Box::new(printable), location: Location::caller() }; | 182 | 13.0k | self.entries.push(entry); | 183 | 13.0k | self | 184 | 13.0k | } |
<mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<alloc::string::String> Line | Count | Source | 180 | 618 | fn attach_printable<P: Display + Send + Sync + 'static>(mut self, printable: P) -> Self { | 181 | 618 | let entry = ReportEntry { message: Box::new(printable), location: Location::caller() }; | 182 | 618 | self.entries.push(entry); | 183 | 618 | self | 184 | 618 | } |
<mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<mp4san::parse::error::MultipleBoxes> Line | Count | Source | 180 | 1.09k | fn attach_printable<P: Display + Send + Sync + 'static>(mut self, printable: P) -> Self { | 181 | 1.09k | let entry = ReportEntry { message: Box::new(printable), location: Location::caller() }; | 182 | 1.09k | self.entries.push(entry); | 183 | 1.09k | self | 184 | 1.09k | } |
<mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<mp4san::parse::error::WhileParsingBox> Line | Count | Source | 180 | 1.86k | fn attach_printable<P: Display + Send + Sync + 'static>(mut self, printable: P) -> Self { | 181 | 1.86k | let entry = ReportEntry { message: Box::new(printable), location: Location::caller() }; | 182 | 1.86k | self.entries.push(entry); | 183 | 1.86k | self | 184 | 1.86k | } |
<mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<mp4san::parse::error::WhileParsingChild> Line | Count | Source | 180 | 15.4k | fn attach_printable<P: Display + Send + Sync + 'static>(mut self, printable: P) -> Self { | 181 | 15.4k | let entry = ReportEntry { message: Box::new(printable), location: Location::caller() }; | 182 | 15.4k | self.entries.push(entry); | 183 | 15.4k | self | 184 | 15.4k | } |
<mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<&str> Line | Count | Source | 180 | 8.29k | fn attach_printable<P: Display + Send + Sync + 'static>(mut self, printable: P) -> Self { | 181 | 8.29k | let entry = ReportEntry { message: Box::new(printable), location: Location::caller() }; | 182 | 8.29k | self.entries.push(entry); | 183 | 8.29k | self | 184 | 8.29k | } |
Unexecuted instantiation: <mediasan_common::error::ReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<_> |
185 | | } |
186 | | |
187 | | // |
188 | | // ReportableErrorStack impls |
189 | | // |
190 | | |
191 | | impl ReportableErrorStack for NullReportStack { |
192 | 0 | fn new() -> Self { |
193 | 0 | Self |
194 | 0 | } Unexecuted instantiation: <mediasan_common::error::NullReportStack as mediasan_common::error::ReportableErrorStack>::new Unexecuted instantiation: <mediasan_common::error::NullReportStack as mediasan_common::error::ReportableErrorStack>::new |
195 | | |
196 | 0 | fn attach_printable<P: Display + Send + Sync + 'static>(self, _printable: P) -> Self { |
197 | 0 | Self |
198 | 0 | } Unexecuted instantiation: <mediasan_common::error::NullReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<_> Unexecuted instantiation: <mediasan_common::error::NullReportStack as mediasan_common::error::ReportableErrorStack>::attach_printable::<_> |
199 | | } |
200 | | |
201 | | // |
202 | | // ResultExt impls |
203 | | // |
204 | | |
205 | | impl<T, E: ReportableError> ResultExt for Result<T, E> { |
206 | | #[track_caller] |
207 | 5.29M | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { |
208 | 5.29M | match self { |
209 | 5.26M | Ok(value) => Ok(value), |
210 | 33.9k | Err(err) => Err(err.attach_printable(printable)), |
211 | | } |
212 | 5.29M | } <core::result::Result<webpsan::parse::vp8x::Vp8xChunk, mediasan_common::error::Report<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<webpsan::parse::error::WhileParsingChunk> Line | Count | Source | 207 | 3.43k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 3.43k | match self { | 209 | 3.41k | Ok(value) => Ok(value), | 210 | 24 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 3.43k | } |
<core::result::Result<webpsan::parse::header::WebpChunk, mediasan_common::error::Report<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<webpsan::parse::error::WhileParsingChunk> Line | Count | Source | 207 | 7.05k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 7.05k | match self { | 209 | 6.98k | Ok(value) => Ok(value), | 210 | 67 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 7.05k | } |
<core::result::Result<webpsan::parse::integers::Reserved<3>, mediasan_common::error::Report<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<webpsan::parse::error::WhileParsingField<&str>> Line | Count | Source | 207 | 3.43k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 3.43k | match self { | 209 | 3.41k | Ok(value) => Ok(value), | 210 | 18 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 3.43k | } |
<core::result::Result<webpsan::parse::alph::AlphChunk, mediasan_common::error::Report<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<webpsan::parse::error::WhileParsingChunk> Line | Count | Source | 207 | 2.40k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 2.40k | match self { | 209 | 2.39k | Ok(value) => Ok(value), | 210 | 12 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 2.40k | } |
<core::result::Result<webpsan::parse::alph::AlphFlags, mediasan_common::error::Report<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<webpsan::parse::error::WhileParsingField<&str>> Line | Count | Source | 207 | 2.40k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 2.40k | match self { | 209 | 2.39k | Ok(value) => Ok(value), | 210 | 12 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 2.40k | } |
<core::result::Result<webpsan::parse::alph::AlphFlags, mediasan_common::error::Report<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mediasan_common::error::WhileParsingType> Line | Count | Source | 207 | 2.40k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 2.40k | match self { | 209 | 2.39k | Ok(value) => Ok(value), | 210 | 12 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 2.40k | } |
<core::result::Result<webpsan::parse::anim::AnimChunk, mediasan_common::error::Report<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<webpsan::parse::error::WhileParsingChunk> Line | Count | Source | 207 | 693 | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 693 | match self { | 209 | 693 | Ok(value) => Ok(value), | 210 | 0 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 693 | } |
<core::result::Result<webpsan::parse::anmf::AnmfChunk, mediasan_common::error::Report<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<webpsan::parse::error::WhileParsingChunk> Line | Count | Source | 207 | 6.61k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 6.61k | match self { | 209 | 6.60k | Ok(value) => Ok(value), | 210 | 15 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 6.61k | } |
<core::result::Result<webpsan::parse::anmf::AnmfFlags, mediasan_common::error::Report<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<webpsan::parse::error::WhileParsingField<&str>> Line | Count | Source | 207 | 6.61k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 6.61k | match self { | 209 | 6.60k | Ok(value) => Ok(value), | 210 | 15 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 6.61k | } |
<core::result::Result<webpsan::parse::anmf::AnmfFlags, mediasan_common::error::Report<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mediasan_common::error::WhileParsingType> Line | Count | Source | 207 | 6.61k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 6.61k | match self { | 209 | 6.60k | Ok(value) => Ok(value), | 210 | 15 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 6.61k | } |
<core::result::Result<webpsan::parse::vp8l::Vp8lChunk, mediasan_common::error::Report<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<webpsan::parse::error::WhileParsingChunk> Line | Count | Source | 207 | 4.00k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 4.00k | match self { | 209 | 3.98k | Ok(value) => Ok(value), | 210 | 21 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 4.00k | } |
<core::result::Result<webpsan::parse::vp8x::Vp8xFlags, mediasan_common::error::Report<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<webpsan::parse::error::WhileParsingField<&str>> Line | Count | Source | 207 | 3.43k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 3.43k | match self { | 209 | 3.43k | Ok(value) => Ok(value), | 210 | 5 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 3.43k | } |
<core::result::Result<webpsan::parse::vp8x::Vp8xFlags, mediasan_common::error::Report<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mediasan_common::error::WhileParsingType> Line | Count | Source | 207 | 3.43k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 3.43k | match self { | 209 | 3.43k | Ok(value) => Ok(value), | 210 | 5 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 3.43k | } |
<core::result::Result<webpsan::parse::integers::OneBasedU24, mediasan_common::error::Report<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<webpsan::parse::error::WhileParsingField<&str>> Line | Count | Source | 207 | 20.0k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 20.0k | match self { | 209 | 20.0k | Ok(value) => Ok(value), | 210 | 0 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 20.0k | } |
<core::result::Result<webpsan::parse::integers::U24, mediasan_common::error::Report<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<webpsan::parse::error::WhileParsingField<&str>> Line | Count | Source | 207 | 19.8k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 19.8k | match self { | 209 | 19.8k | Ok(value) => Ok(value), | 210 | 0 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 19.8k | } |
<core::result::Result<u32, mediasan_common::error::Report<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<webpsan::parse::error::WhileParsingField<&str>> Line | Count | Source | 207 | 693 | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 693 | match self { | 209 | 693 | Ok(value) => Ok(value), | 210 | 0 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 693 | } |
<core::result::Result<u16, mediasan_common::error::Report<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<webpsan::parse::error::WhileParsingField<&str>> Line | Count | Source | 207 | 693 | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 693 | match self { | 209 | 693 | Ok(value) => Ok(value), | 210 | 0 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 693 | } |
Unexecuted instantiation: <core::result::Result<_, mediasan_common::error::Report<_>> as mediasan_common::error::ResultExt>::attach_printable::<_> <core::result::Result<mp4san::parse::ftyp::FtypBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mediasan_common::error::WhileParsingType> Line | Count | Source | 207 | 4.32k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 4.32k | match self { | 209 | 4.28k | Ok(value) => Ok(value), | 210 | 40 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 4.32k | } |
<core::result::Result<mp4san::parse::moov::MoovBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mediasan_common::error::WhileParsingType> Line | Count | Source | 207 | 6.37k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 6.37k | match self { | 209 | 6.03k | Ok(value) => Ok(value), | 210 | 337 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 6.37k | } |
<core::result::Result<mp4san::parse::trak::TrakBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mediasan_common::error::WhileParsingType> Line | Count | Source | 207 | 40.9k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 40.9k | match self { | 209 | 38.5k | Ok(value) => Ok(value), | 210 | 2.34k | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 40.9k | } |
<core::result::Result<&mut mp4san::parse::trak::TrakBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mp4san::parse::error::WhileParsingChild> Line | Count | Source | 207 | 85.7k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 85.7k | match self { | 209 | 83.3k | Ok(value) => Ok(value), | 210 | 2.34k | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 85.7k | } |
<core::result::Result<mp4san::parse::array::BoundedArray<u32, u32>, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mp4san::parse::error::WhileParsingField<&str>> Line | Count | Source | 207 | 14.7k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 14.7k | match self { | 209 | 14.0k | Ok(value) => Ok(value), | 210 | 685 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 14.7k | } |
<core::result::Result<mp4san::parse::array::BoundedArray<u32, u64>, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mp4san::parse::error::WhileParsingField<&str>> Line | Count | Source | 207 | 12.7k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 12.7k | match self { | 209 | 11.9k | Ok(value) => Ok(value), | 210 | 815 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 12.7k | } |
<core::result::Result<mp4san::parse::array::UnboundedArray<mediasan_common::parse::fourcc::FourCC>, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mp4san::parse::error::WhileParsingField<&str>> Line | Count | Source | 207 | 4.28k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 4.28k | match self { | 209 | 4.28k | Ok(value) => Ok(value), | 210 | 0 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 4.28k | } |
<core::result::Result<mp4san::parse::mp4box::Boxes<mp4san::parse::moov::MoovChildrenValidator>, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mp4san::parse::error::WhileParsingField<&str>> Line | Count | Source | 207 | 6.37k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 6.37k | match self { | 209 | 6.03k | Ok(value) => Ok(value), | 210 | 337 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 6.37k | } |
<core::result::Result<mp4san::parse::mp4box::BoxData<dyn mp4san::parse::mp4box::ParsedBox>, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mediasan_common::error::WhileParsingType> Line | Count | Source | 207 | 2.23M | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 2.23M | match self { | 209 | 2.23M | Ok(value) => Ok(value), | 210 | 932 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 2.23M | } |
<core::result::Result<mediasan_common::parse::fourcc::FourCC, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mp4san::parse::error::WhileParsingField<&str>> Line | Count | Source | 207 | 4.32k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 4.32k | match self { | 209 | 4.30k | Ok(value) => Ok(value), | 210 | 23 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 4.32k | } |
<core::result::Result<mediasan_common::parse::fourcc::FourCC, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mediasan_common::error::WhileParsingType> Line | Count | Source | 207 | 24.3k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 24.3k | match self { | 209 | 24.2k | Ok(value) => Ok(value), | 210 | 23 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 24.3k | } |
<core::result::Result<mp4san::parse::co64::Co64Box, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mp4san::parse::error::WhileParsingBox> Line | Count | Source | 207 | 337 | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 337 | match self { | 209 | 0 | Ok(value) => Ok(value), | 210 | 337 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 337 | } |
<core::result::Result<mp4san::parse::co64::Co64Box, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mediasan_common::error::WhileParsingType> Line | Count | Source | 207 | 13.0k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 13.0k | match self { | 209 | 11.6k | Ok(value) => Ok(value), | 210 | 1.42k | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 13.0k | } |
<core::result::Result<mp4san::parse::co64::Co64Box, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<&str> Line | Count | Source | 207 | 337 | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 337 | match self { | 209 | 0 | Ok(value) => Ok(value), | 210 | 337 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 337 | } |
Unexecuted instantiation: <core::result::Result<mp4san::parse::ftyp::FtypBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mp4san::parse::error::WhileParsingBox> Unexecuted instantiation: <core::result::Result<mp4san::parse::ftyp::FtypBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<&str> Unexecuted instantiation: <core::result::Result<mp4san::parse::mdia::MdiaBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mp4san::parse::error::WhileParsingBox> <core::result::Result<mp4san::parse::mdia::MdiaBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mediasan_common::error::WhileParsingType> Line | Count | Source | 207 | 32.3k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 32.3k | match self { | 209 | 31.8k | Ok(value) => Ok(value), | 210 | 508 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 32.3k | } |
Unexecuted instantiation: <core::result::Result<mp4san::parse::mdia::MdiaBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<&str> Unexecuted instantiation: <core::result::Result<mp4san::parse::minf::MinfBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mp4san::parse::error::WhileParsingBox> <core::result::Result<mp4san::parse::minf::MinfBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mediasan_common::error::WhileParsingType> Line | Count | Source | 207 | 31.1k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 31.1k | match self { | 209 | 30.9k | Ok(value) => Ok(value), | 210 | 235 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 31.1k | } |
Unexecuted instantiation: <core::result::Result<mp4san::parse::minf::MinfBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<&str> Unexecuted instantiation: <core::result::Result<mp4san::parse::moov::MoovBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mp4san::parse::error::WhileParsingBox> Unexecuted instantiation: <core::result::Result<mp4san::parse::moov::MoovBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<&str> Unexecuted instantiation: <core::result::Result<mp4san::parse::stbl::StblBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mp4san::parse::error::WhileParsingBox> <core::result::Result<mp4san::parse::stbl::StblBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mediasan_common::error::WhileParsingType> Line | Count | Source | 207 | 30.1k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 30.1k | match self { | 209 | 29.9k | Ok(value) => Ok(value), | 210 | 222 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 30.1k | } |
Unexecuted instantiation: <core::result::Result<mp4san::parse::stbl::StblBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<&str> <core::result::Result<mp4san::parse::stco::StcoBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mp4san::parse::error::WhileParsingBox> Line | Count | Source | 207 | 243 | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 243 | match self { | 209 | 0 | Ok(value) => Ok(value), | 210 | 243 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 243 | } |
<core::result::Result<mp4san::parse::stco::StcoBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mediasan_common::error::WhileParsingType> Line | Count | Source | 207 | 15.5k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 15.5k | match self { | 209 | 13.7k | Ok(value) => Ok(value), | 210 | 1.78k | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 15.5k | } |
<core::result::Result<mp4san::parse::stco::StcoBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<&str> Line | Count | Source | 207 | 243 | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 243 | match self { | 209 | 0 | Ok(value) => Ok(value), | 210 | 243 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 243 | } |
Unexecuted instantiation: <core::result::Result<mp4san::parse::trak::TrakBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mp4san::parse::error::WhileParsingBox> Unexecuted instantiation: <core::result::Result<mp4san::parse::trak::TrakBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<&str> <core::result::Result<mp4san::parse::header::ConstFullBoxHeader, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mp4san::parse::error::WhileParsingField<&str>> Line | Count | Source | 207 | 28.6k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 28.6k | match self { | 209 | 27.5k | Ok(value) => Ok(value), | 210 | 1.12k | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 28.6k | } |
<core::result::Result<mp4san::parse::header::BoxHeader, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mediasan_common::error::WhileParsingType> Line | Count | Source | 207 | 2.23M | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 2.23M | match self { | 209 | 2.23M | Ok(value) => Ok(value), | 210 | 2.60k | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 2.23M | } |
<core::result::Result<mp4san::parse::mp4box::Boxes, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mp4san::parse::error::WhileParsingField<&str>> Line | Count | Source | 207 | 134k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 134k | match self { | 209 | 131k | Ok(value) => Ok(value), | 210 | 3.31k | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 134k | } |
<core::result::Result<&mut mp4san::parse::co64::Co64Box, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mp4san::parse::error::WhileParsingChild> Line | Count | Source | 207 | 22.3k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 22.3k | match self { | 209 | 20.0k | Ok(value) => Ok(value), | 210 | 2.33k | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 22.3k | } |
<core::result::Result<&mut mp4san::parse::mdia::MdiaBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mp4san::parse::error::WhileParsingChild> Line | Count | Source | 207 | 58.1k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 58.1k | match self { | 209 | 51.4k | Ok(value) => Ok(value), | 210 | 6.72k | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 58.1k | } |
<core::result::Result<&mut mp4san::parse::minf::MinfBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mp4san::parse::error::WhileParsingChild> Line | Count | Source | 207 | 51.4k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 51.4k | match self { | 209 | 50.4k | Ok(value) => Ok(value), | 210 | 934 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 51.4k | } |
<core::result::Result<&mut mp4san::parse::stbl::StblBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mp4san::parse::error::WhileParsingChild> Line | Count | Source | 207 | 50.4k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 50.4k | match self { | 209 | 49.5k | Ok(value) => Ok(value), | 210 | 937 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 50.4k | } |
<core::result::Result<&mut mp4san::parse::stco::StcoBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mp4san::parse::error::WhileParsingChild> Line | Count | Source | 207 | 26.9k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 26.9k | match self { | 209 | 24.9k | Ok(value) => Ok(value), | 210 | 2.00k | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 26.9k | } |
<core::result::Result<u32, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mp4san::parse::error::WhileParsingField<&str>> Line | Count | Source | 207 | 4.30k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 4.30k | match self { | 209 | 4.28k | Ok(value) => Ok(value), | 210 | 17 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 4.30k | } |
<core::result::Result<u32, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mediasan_common::error::WhileParsingType> Line | Count | Source | 207 | 27.5k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 208 | 27.5k | match self { | 209 | 26.9k | Ok(value) => Ok(value), | 210 | 517 | Err(err) => Err(err.attach_printable(printable)), | 211 | | } | 212 | 27.5k | } |
Unexecuted instantiation: <core::result::Result<_, mediasan_common::error::Report<_>> as mediasan_common::error::ResultExt>::attach_printable::<_> |
213 | | |
214 | | #[track_caller] |
215 | 238k | fn while_parsing_type(self) -> Self { |
216 | 238k | self.attach_printable(WhileParsingType::new::<T>()) |
217 | 238k | } <core::result::Result<webpsan::parse::alph::AlphFlags, mediasan_common::error::Report<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::while_parsing_type Line | Count | Source | 215 | 2.40k | fn while_parsing_type(self) -> Self { | 216 | 2.40k | self.attach_printable(WhileParsingType::new::<T>()) | 217 | 2.40k | } |
<core::result::Result<webpsan::parse::anmf::AnmfFlags, mediasan_common::error::Report<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::while_parsing_type Line | Count | Source | 215 | 6.61k | fn while_parsing_type(self) -> Self { | 216 | 6.61k | self.attach_printable(WhileParsingType::new::<T>()) | 217 | 6.61k | } |
<core::result::Result<webpsan::parse::vp8x::Vp8xFlags, mediasan_common::error::Report<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::while_parsing_type Line | Count | Source | 215 | 3.43k | fn while_parsing_type(self) -> Self { | 216 | 3.43k | self.attach_printable(WhileParsingType::new::<T>()) | 217 | 3.43k | } |
Unexecuted instantiation: <core::result::Result<_, mediasan_common::error::Report<_>> as mediasan_common::error::ResultExt>::while_parsing_type <core::result::Result<mp4san::parse::ftyp::FtypBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::while_parsing_type Line | Count | Source | 215 | 4.32k | fn while_parsing_type(self) -> Self { | 216 | 4.32k | self.attach_printable(WhileParsingType::new::<T>()) | 217 | 4.32k | } |
<core::result::Result<mp4san::parse::moov::MoovBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::while_parsing_type Line | Count | Source | 215 | 6.37k | fn while_parsing_type(self) -> Self { | 216 | 6.37k | self.attach_printable(WhileParsingType::new::<T>()) | 217 | 6.37k | } |
<core::result::Result<mp4san::parse::trak::TrakBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::while_parsing_type Line | Count | Source | 215 | 40.9k | fn while_parsing_type(self) -> Self { | 216 | 40.9k | self.attach_printable(WhileParsingType::new::<T>()) | 217 | 40.9k | } |
<core::result::Result<mediasan_common::parse::fourcc::FourCC, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::while_parsing_type Line | Count | Source | 215 | 24.3k | fn while_parsing_type(self) -> Self { | 216 | 24.3k | self.attach_printable(WhileParsingType::new::<T>()) | 217 | 24.3k | } |
<core::result::Result<mp4san::parse::co64::Co64Box, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::while_parsing_type Line | Count | Source | 215 | 13.0k | fn while_parsing_type(self) -> Self { | 216 | 13.0k | self.attach_printable(WhileParsingType::new::<T>()) | 217 | 13.0k | } |
<core::result::Result<mp4san::parse::mdia::MdiaBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::while_parsing_type Line | Count | Source | 215 | 32.3k | fn while_parsing_type(self) -> Self { | 216 | 32.3k | self.attach_printable(WhileParsingType::new::<T>()) | 217 | 32.3k | } |
<core::result::Result<mp4san::parse::minf::MinfBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::while_parsing_type Line | Count | Source | 215 | 31.1k | fn while_parsing_type(self) -> Self { | 216 | 31.1k | self.attach_printable(WhileParsingType::new::<T>()) | 217 | 31.1k | } |
<core::result::Result<mp4san::parse::stbl::StblBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::while_parsing_type Line | Count | Source | 215 | 30.1k | fn while_parsing_type(self) -> Self { | 216 | 30.1k | self.attach_printable(WhileParsingType::new::<T>()) | 217 | 30.1k | } |
<core::result::Result<mp4san::parse::stco::StcoBox, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::while_parsing_type Line | Count | Source | 215 | 15.5k | fn while_parsing_type(self) -> Self { | 216 | 15.5k | self.attach_printable(WhileParsingType::new::<T>()) | 217 | 15.5k | } |
<core::result::Result<u32, mediasan_common::error::Report<mp4san::parse::error::ParseError>> as mediasan_common::error::ResultExt>::while_parsing_type Line | Count | Source | 215 | 27.5k | fn while_parsing_type(self) -> Self { | 216 | 27.5k | self.attach_printable(WhileParsingType::new::<T>()) | 217 | 27.5k | } |
Unexecuted instantiation: <core::result::Result<_, mediasan_common::error::Report<_>> as mediasan_common::error::ResultExt>::while_parsing_type |
218 | | } |
219 | | |
220 | | impl<T, E: ReportableError> ResultExt for StdResult<T, Error<E>> { |
221 | | #[track_caller] |
222 | 41.6M | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { |
223 | 21.2k | match self { |
224 | 0 | Err(Error::Io(err)) => Err(Error::Io(err)), |
225 | 21.2k | Err(Error::Parse(err)) => Err(Error::Parse(err.attach_printable(printable))), |
226 | 41.6M | _ => self, |
227 | | } |
228 | 41.6M | } <core::result::Result<webpsan::parse::bitstream::CanonicalHuffmanTree<bitstream_io::LittleEndian, u8>, mediasan_common::error::Error<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<&str> Line | Count | Source | 222 | 140k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 223 | 445 | match self { | 224 | 0 | Err(Error::Io(err)) => Err(Error::Io(err)), | 225 | 445 | Err(Error::Parse(err)) => Err(Error::Parse(err.attach_printable(printable))), | 226 | 139k | _ => self, | 227 | | } | 228 | 140k | } |
<core::result::Result<webpsan::parse::lossless::ColorCache, mediasan_common::error::Error<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mediasan_common::error::WhileParsingType> Line | Count | Source | 222 | 10.0k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 223 | 152 | match self { | 224 | 0 | Err(Error::Io(err)) => Err(Error::Io(err)), | 225 | 152 | Err(Error::Parse(err)) => Err(Error::Parse(err.attach_printable(printable))), | 226 | 9.91k | _ => self, | 227 | | } | 228 | 10.0k | } |
<core::result::Result<webpsan::parse::lossless::ARBPrefixCode, mediasan_common::error::Error<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mediasan_common::error::WhileParsingType> Line | Count | Source | 222 | 527k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 223 | 1.83k | match self { | 224 | 0 | Err(Error::Io(err)) => Err(Error::Io(err)), | 225 | 1.83k | Err(Error::Parse(err)) => Err(Error::Parse(err.attach_printable(printable))), | 226 | 525k | _ => self, | 227 | | } | 228 | 527k | } |
<core::result::Result<webpsan::parse::lossless::BackReference, mediasan_common::error::Error<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mediasan_common::error::WhileParsingType> Line | Count | Source | 222 | 5.32M | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 223 | 324 | match self { | 224 | 0 | Err(Error::Io(err)) => Err(Error::Io(err)), | 225 | 324 | Err(Error::Parse(err)) => Err(Error::Parse(err.attach_printable(printable))), | 226 | 5.32M | _ => self, | 227 | | } | 228 | 5.32M | } |
<core::result::Result<webpsan::parse::lossless::GreenPrefixCode, mediasan_common::error::Error<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mediasan_common::error::WhileParsingType> Line | Count | Source | 222 | 177k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 223 | 1.32k | match self { | 224 | 0 | Err(Error::Io(err)) => Err(Error::Io(err)), | 225 | 1.32k | Err(Error::Parse(err)) => Err(Error::Parse(err.attach_printable(printable))), | 226 | 176k | _ => self, | 227 | | } | 228 | 177k | } |
<core::result::Result<webpsan::parse::lossless::MetaPrefixCodes, mediasan_common::error::Error<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mediasan_common::error::WhileParsingType> Line | Count | Source | 222 | 4.37k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 223 | 747 | match self { | 224 | 0 | Err(Error::Io(err)) => Err(Error::Io(err)), | 225 | 747 | Err(Error::Parse(err)) => Err(Error::Parse(err.attach_printable(printable))), | 226 | 3.63k | _ => self, | 227 | | } | 228 | 4.37k | } |
<core::result::Result<webpsan::parse::lossless::PrefixCodeGroup, mediasan_common::error::Error<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mediasan_common::error::WhileParsingType> Line | Count | Source | 222 | 177k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 223 | 3.66k | match self { | 224 | 0 | Err(Error::Io(err)) => Err(Error::Io(err)), | 225 | 3.66k | Err(Error::Parse(err)) => Err(Error::Parse(err.attach_printable(printable))), | 226 | 174k | _ => self, | 227 | | } | 228 | 177k | } |
<core::result::Result<webpsan::parse::lossless::EntropyCodedImage, mediasan_common::error::Error<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<webpsan::parse::lossless::WhileParsingTransform> Line | Count | Source | 222 | 2.97k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 223 | 1.59k | match self { | 224 | 0 | Err(Error::Io(err)) => Err(Error::Io(err)), | 225 | 1.59k | Err(Error::Parse(err)) => Err(Error::Parse(err.attach_printable(printable))), | 226 | 1.37k | _ => self, | 227 | | } | 228 | 2.97k | } |
<core::result::Result<webpsan::parse::lossless::EntropyCodedImage, mediasan_common::error::Error<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mediasan_common::error::WhileParsingType> Line | Count | Source | 222 | 5.65k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 223 | 2.31k | match self { | 224 | 0 | Err(Error::Io(err)) => Err(Error::Io(err)), | 225 | 2.31k | Err(Error::Parse(err)) => Err(Error::Parse(err.attach_printable(printable))), | 226 | 3.34k | _ => self, | 227 | | } | 228 | 5.65k | } |
<core::result::Result<webpsan::parse::lossless::DistancePrefixCode, mediasan_common::error::Error<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mediasan_common::error::WhileParsingType> Line | Count | Source | 222 | 174k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 223 | 508 | match self { | 224 | 0 | Err(Error::Io(err)) => Err(Error::Io(err)), | 225 | 508 | Err(Error::Parse(err)) => Err(Error::Parse(err.attach_printable(printable))), | 226 | 174k | _ => self, | 227 | | } | 228 | 174k | } |
<core::result::Result<webpsan::parse::lossless::SpatiallyCodedImage, mediasan_common::error::Error<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mediasan_common::error::WhileParsingType> Line | Count | Source | 222 | 4.40k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 223 | 3.64k | match self { | 224 | 0 | Err(Error::Io(err)) => Err(Error::Io(err)), | 225 | 3.64k | Err(Error::Parse(err)) => Err(Error::Parse(err.attach_printable(printable))), | 226 | 762 | _ => self, | 227 | | } | 228 | 4.40k | } |
<core::result::Result<webpsan::parse::lossless::Color, mediasan_common::error::Error<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mediasan_common::error::WhileParsingType> Line | Count | Source | 222 | 35.1M | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 223 | 223 | match self { | 224 | 0 | Err(Error::Io(err)) => Err(Error::Io(err)), | 225 | 223 | Err(Error::Parse(err)) => Err(Error::Parse(err.attach_printable(printable))), | 226 | 35.1M | _ => self, | 227 | | } | 228 | 35.1M | } |
<core::result::Result<webpsan::parse::lossless::Transform, mediasan_common::error::Error<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<mediasan_common::error::WhileParsingType> Line | Count | Source | 222 | 4.28k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 223 | 1.66k | match self { | 224 | 0 | Err(Error::Io(err)) => Err(Error::Io(err)), | 225 | 1.66k | Err(Error::Parse(err)) => Err(Error::Parse(err.attach_printable(printable))), | 226 | 2.62k | _ => self, | 227 | | } | 228 | 4.28k | } |
<core::result::Result<(mediasan_common::parse::fourcc::FourCC, mediasan_common::InputSpan), mediasan_common::error::Error<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<&str> Line | Count | Source | 222 | 13.8k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 223 | 148 | match self { | 224 | 0 | Err(Error::Io(err)) => Err(Error::Io(err)), | 225 | 148 | Err(Error::Parse(err)) => Err(Error::Parse(err.attach_printable(printable))), | 226 | 13.6k | _ => self, | 227 | | } | 228 | 13.8k | } |
<core::result::Result<u32, mediasan_common::error::Error<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<webpsan::parse::lossless::WhileParsingTransform> Line | Count | Source | 222 | 3.01k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 223 | 38 | match self { | 224 | 0 | Err(Error::Io(err)) => Err(Error::Io(err)), | 225 | 38 | Err(Error::Parse(err)) => Err(Error::Parse(err.attach_printable(printable))), | 226 | 2.97k | _ => self, | 227 | | } | 228 | 3.01k | } |
<core::result::Result<(), mediasan_common::error::Error<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::attach_printable::<&str> Line | Count | Source | 222 | 2.65k | fn attach_printable<P: Display + Send + Sync + 'static>(self, printable: P) -> Self { | 223 | 2.62k | match self { | 224 | 0 | Err(Error::Io(err)) => Err(Error::Io(err)), | 225 | 2.62k | Err(Error::Parse(err)) => Err(Error::Parse(err.attach_printable(printable))), | 226 | 32 | _ => self, | 227 | | } | 228 | 2.65k | } |
Unexecuted instantiation: <core::result::Result<_, mediasan_common::error::Error<_>> as mediasan_common::error::ResultExt>::attach_printable::<_> Unexecuted instantiation: <core::result::Result<_, mediasan_common::error::Error<_>> as mediasan_common::error::ResultExt>::attach_printable::<_> |
229 | | |
230 | | #[track_caller] |
231 | 41.5M | fn while_parsing_type(self) -> Self { |
232 | 41.5M | self.attach_printable(WhileParsingType::new::<T>()) |
233 | 41.5M | } <core::result::Result<webpsan::parse::lossless::ColorCache, mediasan_common::error::Error<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::while_parsing_type Line | Count | Source | 231 | 10.0k | fn while_parsing_type(self) -> Self { | 232 | 10.0k | self.attach_printable(WhileParsingType::new::<T>()) | 233 | 10.0k | } |
<core::result::Result<webpsan::parse::lossless::ARBPrefixCode, mediasan_common::error::Error<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::while_parsing_type Line | Count | Source | 231 | 527k | fn while_parsing_type(self) -> Self { | 232 | 527k | self.attach_printable(WhileParsingType::new::<T>()) | 233 | 527k | } |
<core::result::Result<webpsan::parse::lossless::BackReference, mediasan_common::error::Error<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::while_parsing_type Line | Count | Source | 231 | 5.32M | fn while_parsing_type(self) -> Self { | 232 | 5.32M | self.attach_printable(WhileParsingType::new::<T>()) | 233 | 5.32M | } |
<core::result::Result<webpsan::parse::lossless::GreenPrefixCode, mediasan_common::error::Error<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::while_parsing_type Line | Count | Source | 231 | 177k | fn while_parsing_type(self) -> Self { | 232 | 177k | self.attach_printable(WhileParsingType::new::<T>()) | 233 | 177k | } |
<core::result::Result<webpsan::parse::lossless::MetaPrefixCodes, mediasan_common::error::Error<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::while_parsing_type Line | Count | Source | 231 | 4.37k | fn while_parsing_type(self) -> Self { | 232 | 4.37k | self.attach_printable(WhileParsingType::new::<T>()) | 233 | 4.37k | } |
<core::result::Result<webpsan::parse::lossless::PrefixCodeGroup, mediasan_common::error::Error<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::while_parsing_type Line | Count | Source | 231 | 177k | fn while_parsing_type(self) -> Self { | 232 | 177k | self.attach_printable(WhileParsingType::new::<T>()) | 233 | 177k | } |
<core::result::Result<webpsan::parse::lossless::EntropyCodedImage, mediasan_common::error::Error<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::while_parsing_type Line | Count | Source | 231 | 5.65k | fn while_parsing_type(self) -> Self { | 232 | 5.65k | self.attach_printable(WhileParsingType::new::<T>()) | 233 | 5.65k | } |
<core::result::Result<webpsan::parse::lossless::DistancePrefixCode, mediasan_common::error::Error<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::while_parsing_type Line | Count | Source | 231 | 174k | fn while_parsing_type(self) -> Self { | 232 | 174k | self.attach_printable(WhileParsingType::new::<T>()) | 233 | 174k | } |
<core::result::Result<webpsan::parse::lossless::SpatiallyCodedImage, mediasan_common::error::Error<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::while_parsing_type Line | Count | Source | 231 | 4.40k | fn while_parsing_type(self) -> Self { | 232 | 4.40k | self.attach_printable(WhileParsingType::new::<T>()) | 233 | 4.40k | } |
<core::result::Result<webpsan::parse::lossless::Color, mediasan_common::error::Error<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::while_parsing_type Line | Count | Source | 231 | 35.1M | fn while_parsing_type(self) -> Self { | 232 | 35.1M | self.attach_printable(WhileParsingType::new::<T>()) | 233 | 35.1M | } |
<core::result::Result<webpsan::parse::lossless::Transform, mediasan_common::error::Error<webpsan::parse::error::ParseError>> as mediasan_common::error::ResultExt>::while_parsing_type Line | Count | Source | 231 | 4.28k | fn while_parsing_type(self) -> Self { | 232 | 4.28k | self.attach_printable(WhileParsingType::new::<T>()) | 233 | 4.28k | } |
Unexecuted instantiation: <core::result::Result<_, mediasan_common::error::Error<_>> as mediasan_common::error::ResultExt>::while_parsing_type Unexecuted instantiation: <core::result::Result<_, mediasan_common::error::Error<_>> as mediasan_common::error::ResultExt>::while_parsing_type |
234 | | } |
235 | | |
236 | | #[cfg(test)] |
237 | | mod test { |
238 | | use super::*; |
239 | | |
240 | | const TEST_ERROR_DISPLAY: &str = "test error display"; |
241 | | const TEST_ATTACHMENT: &str = "test attachment"; |
242 | | |
243 | | #[derive(Debug, thiserror::Error)] |
244 | | #[error("{}", TEST_ERROR_DISPLAY)] |
245 | | struct TestError; |
246 | | |
247 | | impl ReportableError for TestError { |
248 | | type Stack = ReportStack; |
249 | | } |
250 | | |
251 | | fn test_report() -> Report<TestError> { |
252 | | report_attach!(TestError, TEST_ATTACHMENT) |
253 | | } |
254 | | |
255 | | #[test] |
256 | | fn test_report_display() { |
257 | | assert_eq!(test_report().to_string(), TEST_ERROR_DISPLAY); |
258 | | } |
259 | | |
260 | | #[test] |
261 | | fn test_report_debug() { |
262 | | let report_debug = format!("{report:?}", report = test_report()); |
263 | | assert!(report_debug.starts_with(TEST_ERROR_DISPLAY)); |
264 | | assert!(report_debug.contains(TEST_ATTACHMENT)); |
265 | | } |
266 | | } |