anza 0.6.0

Ultra-lightweight, zero-copy, cryptographically verified Server-Templated UI (STUI) engine
Documentation
1
2
3
4
5
6
7
8
use {
  crate::models::envelope::Envelope,
};

pub fn encode(envelope: &Envelope) -> String {
  let json = serde_json::to_string(envelope).unwrap_or_default();
  format!("event: template\ndata: {}\n\n", json)
}