2 Commits

Author SHA1 Message Date
d86f1e8b88 prep v0.5.4
All checks were successful
Rust/spacepackets/pipeline/head This commit looks good
2023-02-12 17:23:37 +01:00
61c2042e35 Copy and Clone derivations for CDS type level support
All checks were successful
Rust/spacepackets/pipeline/head This commit looks good
2023-02-12 15:48:51 +01:00
3 changed files with 11 additions and 4 deletions

View File

@ -8,6 +8,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
# [unreleased] # [unreleased]
# [v0.5.4] 2023-02-12
## Added
- `Clone` trait requirement for `time::cds::ProvidesDaysLen` trait.
- Added `Copy` and `Clone` derives for `DaysLen16Bits` and `DaysLen24Bits`.
# [v0.5.3] 2023-02-05 # [v0.5.3] 2023-02-05
## Added ## Added

View File

@ -1,6 +1,6 @@
[package] [package]
name = "spacepackets" name = "spacepackets"
version = "0.5.3" version = "0.5.4"
edition = "2021" edition = "2021"
rust-version = "1.60" rust-version = "1.60"
authors = ["Robin Mueller <muellerr@irs.uni-stuttgart.de>"] authors = ["Robin Mueller <muellerr@irs.uni-stuttgart.de>"]

View File

@ -24,7 +24,7 @@ pub const MAX_DAYS_24_BITS: u32 = 2_u32.pow(24) - 1;
/// Generic trait implemented by token structs to specify the length of day field at type /// Generic trait implemented by token structs to specify the length of day field at type
/// level. This trait is only meant to be implemented in this crate and therefore sealed. /// level. This trait is only meant to be implemented in this crate and therefore sealed.
pub trait ProvidesDaysLength: Sealed { pub trait ProvidesDaysLength: Sealed + Clone {
type FieldType: Debug type FieldType: Debug
+ Copy + Copy
+ Clone + Clone
@ -38,7 +38,7 @@ pub trait ProvidesDaysLength: Sealed {
} }
/// Type level token to be used as a generic parameter to [TimeProvider]. /// Type level token to be used as a generic parameter to [TimeProvider].
#[derive(Debug, PartialEq, Eq, Default)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Default)]
pub struct DaysLen16Bits {} pub struct DaysLen16Bits {}
impl Sealed for DaysLen16Bits {} impl Sealed for DaysLen16Bits {}
@ -47,7 +47,7 @@ impl ProvidesDaysLength for DaysLen16Bits {
} }
/// Type level token to be used as a generic parameter to [TimeProvider]. /// Type level token to be used as a generic parameter to [TimeProvider].
#[derive(Debug, PartialEq, Eq, Default)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Default)]
pub struct DaysLen24Bits {} pub struct DaysLen24Bits {}
impl Sealed for DaysLen24Bits {} impl Sealed for DaysLen24Bits {}
impl ProvidesDaysLength for DaysLen24Bits { impl ProvidesDaysLength for DaysLen24Bits {