use std::path::PathBuf; use crate::Error; /// An item returned by scanner streams #[derive(Debug)] pub struct Item { /// The path of the item pub path: PathBuf, /// The event relating to the item pub event: Result, } impl Item { /// Helper function for mapping the inner event [Result] #[inline] pub fn map U>(self, op: F) -> Item { Item { path: self.path, event: self.event.map(op), } } }