custom impl for CommonPduConfig PartialEq
Some checks failed
Rust/spacepackets/pipeline/head There was a failure building this commit

This commit is contained in:
2023-11-24 17:09:23 +01:00
parent 5e892f86b3
commit 7650429c5b
6 changed files with 141 additions and 21 deletions

View File

@ -8,7 +8,7 @@ use crate::ByteConversionError;
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use super::WritablePduPacket;
use super::{CfdpPdu, WritablePduPacket};
/// Finished PDU abstraction.
///
@ -111,6 +111,16 @@ impl EofPdu {
}
}
impl CfdpPdu for EofPdu {
fn pdu_header(&self) -> &PduHeader {
&self.pdu_header
}
fn file_directive_type(&self) -> Option<FileDirectiveType> {
Some(FileDirectiveType::EofPdu)
}
}
impl WritablePduPacket for EofPdu {
fn write_to_bytes(&self, buf: &mut [u8]) -> Result<usize, PduError> {
let expected_len = self.len_written();