#winapi #com #binary-encoding #api-bindings #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

#198 in Windows APIs

Download history 142/week @ 2023-12-06 112/week @ 2023-12-13 81/week @ 2023-12-20 73/week @ 2023-12-27 120/week @ 2024-01-03 126/week @ 2024-01-10 193/week @ 2024-01-17 206/week @ 2024-01-24 154/week @ 2024-01-31 205/week @ 2024-02-07 137/week @ 2024-02-14 295/week @ 2024-02-21 177/week @ 2024-02-28 192/week @ 2024-03-06 148/week @ 2024-03-13 94/week @ 2024-03-20

654 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–435KB