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
//! Neutral IPC Template package.
//!
//! This crate provides a Rust client for the Neutral template engine,
//! which processes templates via Inter-Process Communication (IPC).
//! The client communicates with a Neutral server to render templates
//! with JSON or MsgPack data schemas.
//!
//! # Examples
//!
//! ```no_run
//! use neutralipcrs::NeutralIpcTemplate;
//! use serde_json::json;
//!
//! let schema = json!({
//! "data": {
//! "text": "World"
//! }
//! });
//!
//! let mut template = NeutralIpcTemplate::from_src_value("Hello {:;text:}!", schema).unwrap();
//! let result = template.render().unwrap();
//!
//! println!("{}", result); // Output: "Hello World!"
//! ```
//!
//! ```no_run
//! use neutralipcrs::NeutralIpcTemplate;
//! use serde_json::json;
//!
//! let schema = json!({
//! "data": {
//! "text": "World"
//! }
//! });
//! let schema_msgpack = rmp_serde::to_vec(&schema).unwrap();
//!
//! let mut template = NeutralIpcTemplate::from_src_msgpack("Hello {:;text:}!", &schema_msgpack).unwrap();
//! let result = template.render().unwrap();
//!
//! println!("{}", result); // Output: "Hello World!"
//! ```
//!
//! # Configuration
//!
//! The client reads the server configuration from `/etc/neutral-ipc-cfg.json` to
//! determine connection settings (host and port).
pub
pub
pub use NeutralIpcConfig;
pub use *;
pub use NeutralIpcError;
pub use NeutralIpcTemplate;