This commit is contained in:
parent
038755e56e
commit
e8571866e8
@ -502,8 +502,8 @@ impl SpHeader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Create a struct from a raw slice where the fields have network endianness (big).
|
/// Create a struct from a raw slice where the fields have network endianness (big).
|
||||||
/// This function will also returns the remaining part of the passed slice starting starting
|
/// This function also returns the remaining part of the passed slice starting past the read
|
||||||
/// past the read CCSDS header.
|
/// CCSDS header.
|
||||||
pub fn from_be_bytes(buf: &[u8]) -> Result<(Self, &[u8]), ByteConversionError> {
|
pub fn from_be_bytes(buf: &[u8]) -> Result<(Self, &[u8]), ByteConversionError> {
|
||||||
if buf.len() < CCSDS_HEADER_LEN {
|
if buf.len() < CCSDS_HEADER_LEN {
|
||||||
return Err(ByteConversionError::FromSliceTooSmall(SizeMissmatch {
|
return Err(ByteConversionError::FromSliceTooSmall(SizeMissmatch {
|
||||||
|
Loading…
Reference in New Issue
Block a user