Skip to main content

embedded_text

Function embedded_text 

Source
pub fn embedded_text(bytes: &[u8]) -> Result<String, &'static str>
Expand description

The text a file’s bytes embed as, or why they cannot be: valid UTF-8 (bynk.embed.invalid_encoding) with no NUL byte (bynk.embed.binary_content). A leading byte-order mark is dropped and \r\n and a bare \r become \n, so the same source builds to the same constant whatever a checkout’s line-ending settings do. Everything else, including a trailing newline, is kept as is.