mod auto; mod txt; mod xml; pub use auto::*; pub use txt::*; pub use xml::*; /// Core trait for the sitemap parser implementation. pub trait Parser: Sized { type Error: std::error::Error; // Creates a new `Parser` instance. fn new(reader: R) -> Result; /// Reads another record from the underlying reader. fn read(&mut self) -> Result, Self::Error>; /// Closes tags if needed and releases the reader. fn close(self) -> Result; } /// Core trait for the async sitemap builder implementation. #[cfg(feature = "tokio")] #[cfg_attr(docsrs, doc(cfg(feature = "tokio")))] #[async_trait::async_trait] pub trait AsyncParser: Sized { type Error: std::error::Error; // Creates a new `AsyncParser` instance. async fn new(reader: R) -> Result; /// Reads another record from the underlying reader. async fn read(&mut self) -> Result, Self::Error>; /// Closes tags if needed and releases the reader. async fn close(self) -> Result; }