|
@@ -131,10 +131,11 @@ pub use self::tracer::Tracer;
|
|
pub use self::tuntap_interface::TunTapInterface;
|
|
pub use self::tuntap_interface::TunTapInterface;
|
|
|
|
|
|
/// A description of checksum behavior for a particular protocol.
|
|
/// A description of checksum behavior for a particular protocol.
|
|
-#[derive(Debug, Clone, Copy)]
|
|
|
|
|
|
+#[derive(Debug, Clone, Copy, Default)]
|
|
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
|
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
|
pub enum Checksum {
|
|
pub enum Checksum {
|
|
/// Verify checksum when receiving and compute checksum when sending.
|
|
/// Verify checksum when receiving and compute checksum when sending.
|
|
|
|
+ #[default]
|
|
Both,
|
|
Both,
|
|
/// Verify checksum when receiving.
|
|
/// Verify checksum when receiving.
|
|
Rx,
|
|
Rx,
|
|
@@ -144,12 +145,6 @@ pub enum Checksum {
|
|
None,
|
|
None,
|
|
}
|
|
}
|
|
|
|
|
|
-impl Default for Checksum {
|
|
|
|
- fn default() -> Checksum {
|
|
|
|
- Checksum::Both
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
impl Checksum {
|
|
impl Checksum {
|
|
/// Returns whether checksum should be verified when receiving.
|
|
/// Returns whether checksum should be verified when receiving.
|
|
pub fn rx(&self) -> bool {
|
|
pub fn rx(&self) -> bool {
|