use super::{Backend, Backends}; #[derive(Debug)] pub(crate) struct BackendIter { pub(crate) next: Option, } impl Iterator for BackendIter { type Item = Box; fn next(&mut self) -> Option { match &self.next { None => None, Some(b) => { let result = b.get_backend(); self.next = b.next(); Some(result) } } } }