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§

source

fn to_timestamp(&self) -> String

Convert to a string describing this time.

Provided Methods§

source

fn to_file_timestamp(&self) -> String

Convert to a string describing this time, replacing periods with “_”.

Implementations on Foreign Types§

source§

impl ToTimestamp for f32

Implementors§