anza 0.6.0

Ultra-lightweight, zero-copy, cryptographically verified Server-Templated UI (STUI) engine
Documentation
1
2
3
4
5
6
7
8
9
10
11
#[cfg(feature = "actix")]
use {
  crate::models::envelope::Envelope,
  actix_web::web::Bytes,
};

#[cfg(feature = "actix")]
pub fn bytes(envelope: &Envelope) -> Bytes {
  let frame = crate::stream::sse::frame::encode(envelope);
  Bytes::from(frame)
}