#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

#266 in Windows APIs

Download history 147/week @ 2024-03-12 103/week @ 2024-03-19 177/week @ 2024-03-26 182/week @ 2024-04-02 119/week @ 2024-04-09 238/week @ 2024-04-16 308/week @ 2024-04-23 353/week @ 2024-04-30 459/week @ 2024-05-07 383/week @ 2024-05-14 368/week @ 2024-05-21 318/week @ 2024-05-28 184/week @ 2024-06-04 289/week @ 2024-06-11 323/week @ 2024-06-18 186/week @ 2024-06-25

1,019 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–430KB