oxidd_dump/
lib.rs

1//! Im- and export of decision diagrams
2//!
3//! # Feature flags
4#![doc = document_features::document_features!()]
5#![warn(missing_docs)]
6#![deny(unsafe_op_in_unsafe_fn)]
7#![allow(clippy::type_complexity)]
8// We use const assertions for reporting errors in case of obscure targets. To
9// achieve this, we use assertions that evaluate to `true` on usual targets.
10#![allow(clippy::assertions_on_constants)]
11
12use std::fmt;
13
14/// Like [`std::fmt::Display`], but the format should use ASCII characters only
15pub trait AsciiDisplay {
16    /// Format the value with the given formatter
17    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error>;
18}
19
20/// Parse a value from a string, along with a tag
21pub trait ParseTagged<Tag>: Sized {
22    /// Parse the string `s`
23    fn parse(s: &str) -> Option<(Self, Tag)>;
24}
25
26#[cfg(feature = "dddmp")]
27pub mod dddmp;
28
29// No feature gate here to always have the traits
30pub mod dot;
31
32#[cfg(feature = "visualize")]
33mod visualize;
34#[cfg(feature = "visualize")]
35pub use visualize::{VisualizationListener, Visualizer};