#winapi #com #binary-encoding #windows #api-bindings

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

#147 in Windows APIs

Download history 665/week @ 2024-07-28 600/week @ 2024-08-04 242/week @ 2024-08-11 345/week @ 2024-08-18 496/week @ 2024-08-25 275/week @ 2024-09-01 561/week @ 2024-09-08 582/week @ 2024-09-15 336/week @ 2024-09-22 288/week @ 2024-09-29 430/week @ 2024-10-06 391/week @ 2024-10-13 349/week @ 2024-10-20 388/week @ 2024-10-27 321/week @ 2024-11-03 127/week @ 2024-11-10

1,195 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–425KB