1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//!
//! Traits and tools for formatting (almost) any API structure in Functional-Style Syntax.
//!
//! Most of the structs and enums in the API which implement the standard library's
//! `Display` trait will also implement the `DisplayPretty` trait defined here. the
//! purpose is to give the library a default `Display` implementation that writes in the
//! functional-style syntax, in fact supporting an entirely single-line space separated
//! version and a nested *term-per-line* version.
//!
//! ## Usage
//!
//! ```rust,ignore
//! impl Display for MyType {
//! fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult {
//! self.fmt_pretty(f, Indenter::default(), &:IriPrefixMap::default())
//! }
//! }
//! ```
//!
//! `impl_display_pretty`
//!
//! Value Types
//!
//! ```rust,ignore
//! impl DisplayPretty for Literal {
//! fn fmt_pretty(
//! &self,
//! f: &mut Formatter<'_>,
//! _: &Indenter,
//! _: &IriPrefixMap) -> FmtResult
//! {
//! write!(f, "{}", self.0)
//! }
//! }
//! ```
//!
//!
use ;
// ------------------------------------------------------------------------------------------------
// Public Types
// ------------------------------------------------------------------------------------------------
///
/// This trait's `fmt_pretty` method takes two additional arguments beyond those in the
/// `Display::fmt` method.
///
/// * `indenter` -- used to get the current indentation level, the current indentation
/// prefix string, and to indent/outdent as necessary.
/// * `prefix_map` -- an immutable reference to the prefix map holding the ontology IRI
/// mappings to allow for IRI compression.
///
pub use Indenter;
use IriPrefixMap;