Skip to main content

write_atomic_bytes

Function write_atomic_bytes 

Source
pub fn write_atomic_bytes(path: &Path, contents: &[u8]) -> Result<()>
Expand description

The same guarantee as write_atomic, for content that is not text — clipboard image bytes, specifically. Kept as a second entry point rather than making write_atomic generic over AsRef<[u8]>. so every existing caller (all of which pass &str) keeps its exact signature.