falco_plugin/strings/mod.rs
1//! # Helpers to write CStrings
2//!
3//! The [`std::ffi::CString`] type does not implement [`std::io::Write`] (since it cannot support
4//! values containing zero bytes), so we implement our own wrappers.
5//!
6//! One way is to use [`WriteIntoCString::write_into`], which takes a closure, which then
7//! takes a writer.
8//!
9//! Another is to create a [`CStringWriter`] explicitly.
10
11pub(crate) mod cstring_writer;
12pub(crate) mod from_ptr;
13
14pub use cstring_writer::CStringWriter;
15pub use cstring_writer::WriteIntoCString;