pub enum PDUPayload {
Directive(Operations),
FileData(FileDataPDU),
}Expand description
All possible payloads of a cfdp PDU.
Variants§
Implementations§
Source§impl PDUPayload
impl PDUPayload
Sourcepub fn encoded_len(&self, file_size_flag: FileSizeFlag) -> u16
pub fn encoded_len(&self, file_size_flag: FileSizeFlag) -> u16
computes the total length of the payload without additional encoding/copying
Sourcepub fn encode(self, file_size_flag: FileSizeFlag) -> Vec<u8> ⓘ
pub fn encode(self, file_size_flag: FileSizeFlag) -> Vec<u8> ⓘ
Encodes the payload to a byte stream
Sourcepub fn decode<T: Read>(
buffer: &mut T,
pdu_type: PDUType,
file_size_flag: FileSizeFlag,
segmentation_flag: SegmentedData,
) -> PDUResult<Self>
pub fn decode<T: Read>( buffer: &mut T, pdu_type: PDUType, file_size_flag: FileSizeFlag, segmentation_flag: SegmentedData, ) -> PDUResult<Self>
Decodes from an input bytestream
Trait Implementations§
Source§impl Clone for PDUPayload
impl Clone for PDUPayload
Source§fn clone(&self) -> PDUPayload
fn clone(&self) -> PDUPayload
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PDUPayload
impl Debug for PDUPayload
Source§impl PartialEq for PDUPayload
impl PartialEq for PDUPayload
impl Eq for PDUPayload
impl StructuralPartialEq for PDUPayload
Auto Trait Implementations§
impl Freeze for PDUPayload
impl RefUnwindSafe for PDUPayload
impl Send for PDUPayload
impl Sync for PDUPayload
impl Unpin for PDUPayload
impl UnwindSafe for PDUPayload
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more