#[non_exhaustive]pub enum PacketAssemblyError {
BufferTooSmall {
buffer_length: usize,
packet_length: usize,
},
EmptyDataFieldRequested,
}Expand description
Representation of the set of errors that may be encountered while constructing 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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
BufferTooSmall
Returned when the underlying buffer does not have sufficient bytes to contain a given space packet.
EmptyDataFieldRequested
As per the CCSDS standard, Space Packets shall have at least one byte in their data field. Hence, requests for an empty data field must be rejected.
Trait Implementations§
Source§impl Clone for PacketAssemblyError
impl Clone for PacketAssemblyError
Source§fn clone(&self) -> PacketAssemblyError
fn clone(&self) -> PacketAssemblyError
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 PacketAssemblyError
impl Debug for PacketAssemblyError
Source§impl Display for PacketAssemblyError
impl Display for PacketAssemblyError
Source§impl Error for PacketAssemblyError
impl Error for PacketAssemblyError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<InvalidPacketDataLength> for PacketAssemblyError
impl From<InvalidPacketDataLength> for PacketAssemblyError
Source§fn from(value: InvalidPacketDataLength) -> Self
fn from(value: InvalidPacketDataLength) -> Self
Converts to this type from the input type.
Source§impl Hash for PacketAssemblyError
impl Hash for PacketAssemblyError
Source§impl PartialEq for PacketAssemblyError
impl PartialEq for PacketAssemblyError
impl Copy for PacketAssemblyError
impl Eq for PacketAssemblyError
impl StructuralPartialEq for PacketAssemblyError
Auto Trait Implementations§
impl Freeze for PacketAssemblyError
impl RefUnwindSafe for PacketAssemblyError
impl Send for PacketAssemblyError
impl Sync for PacketAssemblyError
impl Unpin for PacketAssemblyError
impl UnwindSafe for PacketAssemblyError
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