Skip to main content

write_capped

Function write_capped 

Source
pub fn write_capped(
    path: &Path,
    text: &str,
    cap: usize,
) -> Result<(), WriteError>
Expand description

Write a card, refusing text past cap.

ยงErrors

WriteError::Overflow past the cap, WriteError::Refused for unsafe or too-complex prose, WriteError::Io when the write fails.