1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
use serde::{Serialize, Deserialize};

/// A representation of duration as a numeric value and a display string.

#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct Duration {

    /// A string representation of the duration value.
    pub text: String,

    /// The duration in seconds.
    pub value: u32,

} // struct