pub struct TimePeriod {
pub meta: Bo4eMeta,
pub start: Option<DateTime<Utc>>,
pub end: Option<DateTime<Utc>>,
}Expand description
A time period with start and end timestamps.
German: Zeitraum
§Example
use bo4e_core::com::TimePeriod;
use chrono::Utc;
let period = TimePeriod {
start: Some(Utc::now()),
end: None, // Open-ended
..Default::default()
};Fields§
§meta: Bo4eMetaBO4E metadata
start: Option<DateTime<Utc>>Start of the period (Startdatum)
end: Option<DateTime<Utc>>End of the period (Enddatum)
Implementations§
Trait Implementations§
Source§impl Bo4eObject for TimePeriod
impl Bo4eObject for TimePeriod
Source§fn type_name_german() -> &'static str
fn type_name_german() -> &'static str
Returns the German type name as used in the
_typ field. Read moreSource§fn type_name_english() -> &'static str
fn type_name_english() -> &'static str
Returns the English type name. Read more
Source§impl Clone for TimePeriod
impl Clone for TimePeriod
Source§fn clone(&self) -> TimePeriod
fn clone(&self) -> TimePeriod
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TimePeriod
impl Debug for TimePeriod
Source§impl Default for TimePeriod
impl Default for TimePeriod
Source§fn default() -> TimePeriod
fn default() -> TimePeriod
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TimePeriod
impl<'de> Deserialize<'de> for TimePeriod
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TimePeriod
impl PartialEq for TimePeriod
Source§impl Serialize for TimePeriod
impl Serialize for TimePeriod
impl StructuralPartialEq for TimePeriod
Auto Trait Implementations§
impl Freeze for TimePeriod
impl RefUnwindSafe for TimePeriod
impl Send for TimePeriod
impl Sync for TimePeriod
impl Unpin for TimePeriod
impl UnsafeUnpin for TimePeriod
impl UnwindSafe for TimePeriod
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more