Add documentation
This commit is contained in:
parent
7cb5ff2fc2
commit
4f354768b6
1 changed files with 17 additions and 0 deletions
|
@ -1,4 +1,21 @@
|
||||||
//! Functions to generate nettext representations of data structures
|
//! Functions to generate nettext representations of data structures
|
||||||
|
//!
|
||||||
|
//! Example:
|
||||||
|
//!
|
||||||
|
//! ```
|
||||||
|
//! use nettext::enc::*;
|
||||||
|
//!
|
||||||
|
//! let nettext_encoding = list([
|
||||||
|
//! string("CALL").unwrap(),
|
||||||
|
//! string("myfunction").unwrap(),
|
||||||
|
//! dict([
|
||||||
|
//! ("a", string("hello").unwrap()),
|
||||||
|
//! ("b", string("world").unwrap()),
|
||||||
|
//! ("c", raw(b"{ a = 12, b = 42 }").unwrap()),
|
||||||
|
//! ("d", bytes_split(&((0..128u8).collect::<Vec<_>>()))),
|
||||||
|
//! ]),
|
||||||
|
//! ]).unwrap().encode();
|
||||||
|
//! ```
|
||||||
|
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue