This crate provides a library to store and load documentation content in a single file.
Content is organized into pages. The collection of pages is a book. Both pages and books can contain metadata entries.
Books
The main type in the crate is [Book]. A [Book] may contains multiple
pages and metadata entries.
Creating a New Book
New books are created with [BookBuilder].
Content is added with add_metadata and
new_page.
When the book is completed, it can be persisted with
dump.
Optionally, data can be compressed with
set_compression.
Example
use ;
use ;
let mut buffer: = Vecnew;
let mut builder = builder;
builder.new_page.set_content;
builder.new_page.set_content;
builder
.add_metadata
.dump;
let book = load.unwrap;
assert_eq!;
Loading a Book
A book written by [BookBuilder::dump] can be loaded with [Book::load].
Crate Features
Features can be used for controlling some functionalities in the library:
deflate
Add supports for compressing books with DEFLATE.
lz4
Add supports for compressing books with LZ4.
All features are enabled by default.