Struct winstructs::timestamp::WinTimestamp
source · pub struct WinTimestamp(_);
Expand description
https://docs.microsoft.com/en-us/windows/desktop/api/minwinbase/ns-minwinbase-filetime Contains a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC).
Example
let raw_timestamp: &[u8] = &[0x53, 0xC7, 0x8B, 0x18, 0xC5, 0xCC, 0xCE, 0x01];
let timestamp = WinTimestamp::new(raw_timestamp).unwrap();
assert_eq!(format!("{}", timestamp), "2013-10-19 12:16:53.276040 UTC");
assert_eq!(format!("{:?}", timestamp), "2013-10-19 12:16:53.276040 UTC");
Implementations§
source§impl WinTimestamp
impl WinTimestamp
pub fn new(buffer: &[u8]) -> Result<Self>
pub fn from_reader<R: Read>(reader: &mut R) -> Result<WinTimestamp>
pub fn to_datetime(&self) -> DateTime<Utc>
Trait Implementations§
source§impl Clone for WinTimestamp
impl Clone for WinTimestamp
source§fn clone(&self) -> WinTimestamp
fn clone(&self) -> WinTimestamp
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 WinTimestamp
impl Debug for WinTimestamp
Auto Trait Implementations§
impl RefUnwindSafe for WinTimestamp
impl Send for WinTimestamp
impl Sync for WinTimestamp
impl Unpin for WinTimestamp
impl UnwindSafe for WinTimestamp
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