INNER CODE UNIT · Rust

fmt

matiaskorhonen/paper-age · src/convenience.rs:24

    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        match self {
            PaperAgeError::Encryption(msg) => write!(f, "Encryption failed: {msg}"),
            PaperAgeError::DocumentInit(msg) => write!(f, "Document initialization failed: {msg}"),
            PaperAgeError::PdfCreation(msg) => write!(f, "PDF creation failed: {msg}"),
        }
    }
}

impl std::error::Error for PaperAgeError {}

/// Generate a PaperAge PDF from plaintext data and a passphrase.
///
/// This is a high-level convenience function that handles encryption and PDF
/// generation in a single call.
///
/// # Arguments
///

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…