Trait substudy::time::ToTimestamp
source · pub trait ToTimestamp {
// Required method
fn to_timestamp(&self) -> String;
// Provided method
fn to_file_timestamp(&self) -> String { ... }
}
Expand description
Convert a time to a timestamp string. This is mostly used for giving files semi-unique names so that we can dump files from multiple, related export runs into a single directory without too much chance of them overwriting each other unless they’re basically the same file.
Required Methods§
sourcefn to_timestamp(&self) -> String
fn to_timestamp(&self) -> String
Convert to a string describing this time.
Provided Methods§
sourcefn to_file_timestamp(&self) -> String
fn to_file_timestamp(&self) -> String
Convert to a string describing this time, replacing periods with “_”.