+
+/// Arbitrary error type returned from adapters, which may be user-implemented
+pub type AdapterError = Box<dyn std::error::Error + Sync + Send + 'static>;
+
+/// Arbitrary error type returned from soundmodem components, which may be user-implemented
+pub type SoundmodemError = Box<dyn std::error::Error + Sync + Send + 'static>;
+
+/// Iterator over potentially multiple errors
+#[derive(Debug, Error)]
+pub struct M17Errors(pub(crate) Vec<M17Error>);
+impl Iterator for M17Errors {
+ type Item = M17Error;
+
+ fn next(&mut self) -> Option<Self::Item> {
+ self.0.pop()
+ }
+}
+
+impl Display for M17Errors {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ let mut displays = vec![];
+ for e in &self.0 {
+ displays.push(e.to_string());
+ }
+ write!(f, "[{}]", displays.join(", "))
+ }
+}
+
+#[derive(Debug, Error)]
+pub enum M17SoundmodemError {}