diff --git a/src/lib.rs b/src/lib.rs index 714ace5..9aa7955 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -478,10 +478,12 @@ impl SpHeader { //noinspection RsTraitImplementation delegate!(to self.packet_id { + /// Returns [false] and fails if the APID exceeds [MAX_APID] pub fn set_apid(&mut self, apid: u16) -> bool; }); delegate!(to self.psc { + /// Returns [false] and fails if the sequence count exceeds [MAX_SEQ_COUNT] pub fn set_seq_count(&mut self, seq_count: u16) -> bool; }); diff --git a/src/tc.rs b/src/tc.rs index 85b0b6d..9db2e86 100644 --- a/src/tc.rs +++ b/src/tc.rs @@ -208,9 +208,9 @@ impl PusTcSecondaryHeader { /// This class models a PUS telecommand. It is the primary data structure to generate the raw byte /// representation of a PUS telecommand or to deserialize from one from raw bytes. /// -/// This class also derives the [serde::Serialize] and [serde::Deserialize] trait which allows -/// to send around TC packets in a raw byte format using a serde provider like -/// [postcard](https://docs.rs/postcard/latest/postcard/). +/// This class also derives the [serde::Serialize] and [serde::Deserialize] trait if the +/// [serde] feature is used, which allows to send around TC packets in a raw byte format using a +/// serde provider like [postcard](https://docs.rs/postcard/latest/postcard/). /// /// There is no spare bytes support yet. #[derive(PartialEq, Eq, Copy, Clone, Debug)] @@ -326,7 +326,7 @@ impl<'slice> PusTc<'slice> { self.crc16 = Some(digest.finalize()) } - /// This helper function calls both [PusTc.update_ccsds_data_len] and [PusTc.calc_own_crc16]. + /// This helper function calls both [PusTc::update_ccsds_data_len] and [PusTc::calc_own_crc16]. pub fn update_packet_fields(&mut self) { self.update_ccsds_data_len(); self.calc_own_crc16(); diff --git a/src/tm.rs b/src/tm.rs index 6b6be17..3213413 100644 --- a/src/tm.rs +++ b/src/tm.rs @@ -196,9 +196,9 @@ impl<'slice> TryFrom> for PusTmSecondaryHeader<'slice /// structure to generate the raw byte representation of PUS telemetry or to /// deserialize from one from raw bytes. /// -/// This class also derives the [serde::Serialize] and [serde::Deserialize] trait which allows -/// to send around TM packets in a raw byte format using a serde provider like -/// [postcard](https://docs.rs/postcard/latest/postcard/). +/// This class also derives the [serde::Serialize] and [serde::Deserialize] trait if the [serde] +/// feature is used which allows to send around TM packets in a raw byte format using a serde +/// provider like [postcard](https://docs.rs/postcard/latest/postcard/). /// /// There is no spare bytes support yet. #[derive(PartialEq, Eq, Debug, Copy, Clone)]