From 6c94102afc70ce28eee3d17aad997a056aaf9195 Mon Sep 17 00:00:00 2001 From: Silas Bartha Date: Fri, 11 Oct 2024 19:01:52 -0400 Subject: gltf, wav, and binary codecs --- src/codec.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/codec.rs') diff --git a/src/codec.rs b/src/codec.rs index 11fa76e..c46860f 100644 --- a/src/codec.rs +++ b/src/codec.rs @@ -3,16 +3,16 @@ use thiserror::Error; /// Codecs enable the concealment of payload data inside the data of a carrier. pub trait Codec { /// Embeds payload data inside carrier, returning the result. - fn encode(&self, carrier: &[u8], payload: &[u8]) -> Result, CodecError>; + fn encode(&self, carrier: &[u8], payload: &[u8]) -> Result, Error>; /// Extracts payload data from an encoded carrier, returning the carrier with data removed and the /// payload data. - fn decode(&self, encoded: &[u8]) -> Result<(Vec, Vec), CodecError>; + fn decode(&self, encoded: &[u8]) -> Result<(Vec, Vec), Error>; } /// Errors produced by a codec #[derive(Debug, Error)] -pub enum CodecError { +pub enum Error { /// Variant used when data is determined not to be encoded. Note that a codec may have no way /// of knowing this, so this may not be returned even if the data was not encoded #[error("Data was not encoded with this codec")] -- cgit v1.2.3