pub fn encode_for_atomic(content: &str, encoding: &str) -> Result<Vec<u8>>
Encode a string for atomic mode staging. Public wrapper around encode_string.