#![warn(
clippy::doc_markdown,
missing_debug_implementations,
rust_2018_idioms,
missing_docs,
clippy::redundant_clone,
clippy::clone_on_copy
)]
#![doc = include_str!("../README.md")]
pub mod analysis;
pub mod conformance;
pub mod core;
pub mod discovery;
pub use core::io::{Exportable, Importable};
pub use core::{EventLog, PetriNet, OCEL};
pub mod bindings;
#[doc(hidden)]
pub mod test_utils {
use std::path::PathBuf;
#[allow(unused)]
pub fn get_test_data_path() -> PathBuf {
std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("test_data")
}
}
#[allow(missing_debug_implementations)]
pub enum XMLWriterWrapper<'a, W> {
Owned(quick_xml::Writer<W>),
Ref(&'a mut quick_xml::Writer<W>),
}
impl<'a, W> XMLWriterWrapper<'a, W> {
pub fn to_xml_writer(&'a mut self) -> &'a mut quick_xml::Writer<W> {
match self {
XMLWriterWrapper::Owned(w) => w,
XMLWriterWrapper::Ref(w) => w,
}
}
}
impl<W: std::io::Write> From<W> for XMLWriterWrapper<'_, W> {
fn from(w: W) -> Self {
Self::Owned(quick_xml::Writer::new(w))
}
}
impl<'a, W> From<&'a mut quick_xml::Writer<W>> for XMLWriterWrapper<'a, W> {
fn from(w: &'a mut quick_xml::Writer<W>) -> Self {
Self::Ref(w)
}
}