pub struct Timestamp {
pub require: bool,
pub field: String,
pub mode: String,
pub title: String,
pub def: f64,
pub dec: i32,
pub show: bool,
pub describe: String,
}Fields§
§require: bool§field: String§mode: String§title: String§def: f64§dec: i32§show: bool§describe: StringImplementations§
source§impl Timestamp
impl Timestamp
pub fn new( require: bool, field: &str, title: &str, dec: i32, default: f64 ) -> Self
sourcepub fn timestamp_ms() -> i64
pub fn timestamp_ms() -> i64
毫秒 13位
sourcepub fn timestamp_ms_f64() -> f64
pub fn timestamp_ms_f64() -> f64
毫秒 10位+3位
sourcepub fn timestamp_μs() -> i64
pub fn timestamp_μs() -> i64
微秒 16位
sourcepub fn timestamp_μs_f64() -> f64
pub fn timestamp_μs_f64() -> f64
微秒 16位
sourcepub fn timestamp_ns() -> i64
pub fn timestamp_ns() -> i64
纳秒 19位
sourcepub fn date_to_timestamp(date: &str) -> i64
pub fn date_to_timestamp(date: &str) -> i64
日期转时间戳
sourcepub fn datetime_to_timestamp(datetime: &str) -> i64
pub fn datetime_to_timestamp(datetime: &str) -> i64
日期时间转时间戳
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Timestamp
impl Send for Timestamp
impl Sync for Timestamp
impl Unpin for Timestamp
impl UnwindSafe for Timestamp
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