pub struct Timestamp {
pub require: bool,
pub field: String,
pub mode: String,
pub title: String,
pub def: f64,
pub dec: i32,
}
Fields§
§require: bool
§field: String
§mode: String
§title: String
§def: f64
§dec: i32
Implementations§
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 Freeze for Timestamp
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