From d9f8855f842a1e49252dce84f52bbbb19d66f8bc Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Sun, 22 Nov 2020 14:36:39 -0800 Subject: [PATCH] Documentation --- src/errors.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/errors.rs b/src/errors.rs index deec277..5b64798 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -1,16 +1,30 @@ use std::io; use super::fourcc::FourCC; +/// Errors returned by methods in this crate. #[derive(Debug)] pub enum Error { + /// An `io::Error` occurred IOError(io::Error), + /// The file does not begin with a recognized WAVE header HeaderNotRecognized, + /// A wave file with a 64-bit header does not contain + /// the required `ds64` metadata element MissingRequiredDS64, + /// A data chunk required to complete the operation + /// is not present in the file ChunkMissing { signature : FourCC }, + /// The file is formatted improperly FmtChunkAfterData, + /// The file did not validate as a minimal WAV file NotMinimalWaveFile, + /// The `data` chunk is not aligned to the desired page + /// boundary DataChunkNotAligned, + /// The file cannot be converted into an RF64 file due + /// to its internal structure InsufficientDS64Reservation {expected: u64, actual: u64}, + /// The file is not optimized for writing new data DataChunkNotPreparedForAppend }