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
/*!
Provides the ability to produce formatted, readable, versions of a policy document.
The intent of this module is to provide the ability to produce documentation that describes the
behavior of a policy. The intent was to provide documentation that uses a precise method to
describe the conditions under which a policy will either allow or deny an action. This is useful
when describing how policies may be used within a particular service, or describing template
policies.
# Example
```rust
use aws_iam::{io, model::*, document};
use std::path::PathBuf;
let policy = io::read_from_file(
&PathBuf::from("tests/data/good/example-021.json")
).expect("Error reading file");
let mut generator = document::MarkdownGenerator::default();
document::visitor::walk_policy(&policy, &mut generator);
```
# Building a new Visitor
To build a new documentation tool, ot any tool that wishes to inspect the structure of a policy,
you can implement the traits within the [`visitor`](visitor/index.html) module and call them with
the [`walk_policy`](document/fn.walk_policy.html) function as in the example above. All of the
visitor traits have default implementations for their members and so only those events you care
to handle need be implemented.
*/
// ------------------------------------------------------------------------------------------------
// Modules
// ------------------------------------------------------------------------------------------------
pub use MarkdownGenerator;
pub use LatexGenerator;