use crate::ocp1::{
pdu::{InvalidMessageCount, PduType},
utils::writer::Error as WriterError,
};
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("cannot write a message that large")]
DataTooLarge,
#[error(transparent)]
InvalidMessageCount(#[from] InvalidMessageCount),
#[error(transparent)]
WriterError(#[from] WriterError),
#[error("no messages")]
NoMessages,
#[error("pdu type mismatch: expected {expected:?}, found {found:?}")]
MismatchedPduType { expected: PduType, found: PduType },
}