TLV and TV abstractions complete
Some checks failed
Rust/spacepackets/pipeline/head There was a failure building this commit
Rust/spacepackets/pipeline/pr-main There was a failure building this commit

This commit is contained in:
2023-05-18 15:01:08 +02:00
parent 0c085ef27b
commit b37d932e4f
5 changed files with 187 additions and 53 deletions

View File

@ -63,14 +63,21 @@ impl Display for PduError {
)
}
PduError::ByteConversionError(e) => {
write!(f, "low level byte conversion error: {e}")
write!(f, "{}", e)
}
}
}
}
#[cfg(feature = "std")]
impl Error for PduError {}
impl Error for PduError {
fn source(&self) -> Option<&(dyn Error + 'static)> {
match self {
PduError::ByteConversionError(e) => Some(e),
_ => None,
}
}
}
impl From<ByteConversionError> for PduError {
fn from(value: ByteConversionError) -> Self {