Skip to content

Commit

Permalink
Merge pull request #167 from gwbres/timescale_serdes
Browse files Browse the repository at this point in the history
timescale.rs: derive serdes traits when feasible
  • Loading branch information
ChristopherRabotin authored Nov 2, 2022
2 parents 6895e85 + 7ff3fab commit fe389c6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/timescale.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
#[cfg(feature = "python")]
use pyo3::prelude::*;

#[cfg(feature = "serde")]
use serde_derive::{Deserialize, Serialize};

use core::str::FromStr;

use crate::{Duration, Epoch, Errors, ParsingErrors, SECONDS_PER_DAY};
Expand Down Expand Up @@ -50,6 +53,7 @@ pub const UNIX_REF_EPOCH: Epoch = Epoch::from_tai_duration(Duration {
/// Enum of the different time systems available
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
#[cfg_attr(feature = "python", pyclass)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub enum TimeScale {
/// TAI is the representation of an Epoch internally
TAI,
Expand Down

0 comments on commit fe389c6

Please sign in to comment.