[][src]Struct winstructs::timestamp::WinTimestamp

pub struct WinTimestamp(_);

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");

Methods

impl WinTimestamp[src]

pub fn new(buffer: &[u8]) -> Result<Self>[src]

pub fn from_reader<R: Read>(reader: &mut R) -> Result<WinTimestamp>[src]

pub fn to_datetime(&self) -> DateTime<Utc>[src]

Trait Implementations

impl Clone for WinTimestamp[src]

impl Debug for WinTimestamp[src]

impl Display for WinTimestamp[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.