#[non_exhaustive]pub enum InvalidSpacePacket {
SliceTooSmallForSpacePacketHeader {
length: usize,
},
UnsupportedPacketVersion {
version: PacketVersionNumber,
},
PartialPacket {
packet_size: usize,
buffer_size: usize,
},
IdlePacketWithSecondaryHeader,
}Expand description
Representation of the set of errors that may be encountered while deserializing a Space Packet. Marked as non-exhaustive to permit extension with additional semantic errors in the future without breaking API.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SliceTooSmallForSpacePacketHeader
Returned when a byte slice is too small to contain any Space Packet (i.e., is smaller than a header with a single-byte user data field).
UnsupportedPacketVersion
Returned when a slice does not have a known and supported packet version. For convenience, the packet version that is stored at the “conventional” (CCSDS packet version 0) is also returned, though it does not need to be meaningful in other packet versions.
Fields
version: PacketVersionNumberPartialPacket
Returned when the decoded packet is not fully contained in the passed buffer.
IdlePacketWithSecondaryHeader
Returned when the Space Packet is idle (has an ‘all ones’ APID) but also contains a secondary header. This is forbidden by CCSDS 133.0-B-2.
Trait Implementations§
Source§impl Clone for InvalidSpacePacket
impl Clone for InvalidSpacePacket
Source§fn clone(&self) -> InvalidSpacePacket
fn clone(&self) -> InvalidSpacePacket
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more