pub enum Error {
OutputBufferTooSmall,
ZeroInEncodedData,
TruncatedEncodedData,
}Expand description
Errors that can occur during COBS encoding/decoding.
Variants§
OutputBufferTooSmall
For functions that generate output in an array, such as cobs::encode_array(), it indicates that the output array size is too small for the output data.
ZeroInEncodedData
For decoding functions, it indicates that an unexpected zero-byte was found in the input data. Valid COBS-encoded data should not contain any zero-bytes. This error is only applicable for decoding.
TruncatedEncodedData
For COBS decoding functions, it indicates that the COBS-encoded data was not valid; the data appears to be truncated. Or it may be invalid due to data corruption. More data was expected given the last length-byte value in the data. This error is only applicable for COBS decoding (not COBS/R).
Trait Implementations§
Source§impl Display for Error
Implement trait fmt::Display.
impl Display for Error
Implement trait fmt::Display.
Source§impl Error for Error
Available on crate feature std only.Apply trait std::error::Error.
impl Error for Error
std only.Apply trait std::error::Error.