#winapi #com #system-time #windows-com #windows

filetime_win

Windows FILETIME and SYSTEMTIME string and binary serialization

4 releases

Uses old Rust 2015

0.2.0 Dec 17, 2020
0.1.0 Mar 21, 2019
0.1.0-alpha2 Mar 5, 2019
0.1.0-alpha1 Mar 2, 2019

#276 in Windows APIs

Download history 265/week @ 2024-12-16 67/week @ 2024-12-23 94/week @ 2024-12-30 206/week @ 2025-01-06 232/week @ 2025-01-13 223/week @ 2025-01-20 228/week @ 2025-01-27 291/week @ 2025-02-03 270/week @ 2025-02-10 280/week @ 2025-02-17 312/week @ 2025-02-24 257/week @ 2025-03-03 394/week @ 2025-03-10 352/week @ 2025-03-17 286/week @ 2025-03-24 304/week @ 2025-03-31

1,349 downloads per month

MIT/Apache

11KB
179 lines

Windows FILETIME and SYSTEMTIME string and binary serialization

A transparent wrapper is provided for each type, with Display for SystemTimeUTC and Ord and Eq for FileTime.

serde

Use the filetime_serde feature to derive Serialize and Deserialize, you can then derive them for structs containing FILETIME and SYSTEMTIME like so:

#
#
use filetime_win::{FileTimeSerde, SystemTimeSerde};
use serde_derive::{Deserialize, Serialize};
use winapi::shared::minwindef::FILETIME;
use winapi::um::minwinbase::SYSTEMTIME;

#[derive(Serialize, Deserialize)]
struct SerdeTest {
    #[serde(with = "FileTimeSerde")]
    ft: FILETIME,
    #[serde(with = "SystemTimeSerde")]
    st: SYSTEMTIME,
}

Dependencies

~32–415KB