make metadata params accessible
Some checks failed
Rust/spacepackets/pipeline/head There was a failure building this commit

This commit is contained in:
Robin Müller 2023-07-26 22:53:05 +02:00
parent 041959e546
commit c65a024d97
Signed by: muellerr
GPG Key ID: A649FB78196E3849

View File

@ -14,9 +14,9 @@ use serde::{Deserialize, Serialize};
#[derive(Debug, Copy, Clone, PartialEq, Eq)] #[derive(Debug, Copy, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct MetadataGenericParams { pub struct MetadataGenericParams {
closure_requested: bool, pub closure_requested: bool,
checksum_type: ChecksumType, pub checksum_type: ChecksumType,
file_size: u64, pub file_size: u64,
} }
impl MetadataGenericParams { impl MetadataGenericParams {
@ -145,6 +145,10 @@ impl<'src_name, 'dest_name, 'opts> MetadataPdu<'src_name, 'dest_name, 'opts> {
pdu pdu
} }
pub fn metadata_params(&self) -> &MetadataGenericParams {
&self.metadata_params
}
pub fn src_file_name(&self) -> Lv<'src_name> { pub fn src_file_name(&self) -> Lv<'src_name> {
self.src_file_name self.src_file_name
} }