wafrift_encoding/
error.rs1#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
5pub enum EncodeError {
6 #[error("payload too large: {actual} bytes (max {max} bytes)")]
8 PayloadTooLarge { max: usize, actual: usize },
9 #[error("layered output too large: {actual} bytes (max {max} bytes)")]
11 LayeredOutputTooLarge { max: usize, actual: usize },
12 #[error("payload contains invalid UTF-8")]
14 InvalidUtf8,
15 #[error("strategy {strategy} is not valid in context {context}")]
17 InvalidContext {
18 strategy: &'static str,
19 context: String,
20 },
21 #[error("invalid config: {0}")]
23 InvalidConfig(String),
24}