Enum osmio::TimestampFormat
source · pub enum TimestampFormat {
ISOString(String),
EpochNunber(i64),
}
Expand description
Timestamps can be stored as an ISO formatted string, or number of seconds since unix epoch
In XML files, timestamps are represented as ISO strings, and in PBF files, as integer seconds since the epoch
Variants§
Implementations§
source§impl TimestampFormat
impl TimestampFormat
pub fn to_iso_string(&self) -> String
pub fn to_epoch_number(&self) -> i64
Trait Implementations§
source§impl Clone for TimestampFormat
impl Clone for TimestampFormat
source§fn clone(&self) -> TimestampFormat
fn clone(&self) -> TimestampFormat
Returns a copy 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 TimestampFormat
impl Debug for TimestampFormat
source§impl<'de> Deserialize<'de> for TimestampFormat
impl<'de> Deserialize<'de> for TimestampFormat
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 Display for TimestampFormat
impl Display for TimestampFormat
source§impl FromStr for TimestampFormat
impl FromStr for TimestampFormat
source§impl PartialEq for TimestampFormat
impl PartialEq for TimestampFormat
source§impl PartialOrd for TimestampFormat
impl PartialOrd for TimestampFormat
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for TimestampFormat
impl Serialize for TimestampFormat
impl Eq for TimestampFormat
impl StructuralEq for TimestampFormat
Auto Trait Implementations§
impl RefUnwindSafe for TimestampFormat
impl Send for TimestampFormat
impl Sync for TimestampFormat
impl Unpin for TimestampFormat
impl UnwindSafe for TimestampFormat
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