npsd 0.2.0

Network payload serializer / deserializer framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::time::{Duration, Instant, SystemTime};

use super::PayloadInfo;

impl PayloadInfo for Duration {
    const TYPE: &'static str = "Duration";
    const SIZE: Option<usize> = Some(std::mem::size_of::<Duration>());
}

impl PayloadInfo for Instant {
    const TYPE: &'static str = "Instant";
    const SIZE: Option<usize> = Some(std::mem::size_of::<Instant>());
}

impl PayloadInfo for SystemTime {
    const TYPE: &'static str = "SystemTime";
    const SIZE: Option<usize> = Some(std::mem::size_of::<SystemTime>());
}