distant-protocol 0.20.0

Protocol library for distant, providing data structures used between the client and server
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/// Used purely for skipping serialization of values that are false by default.
#[inline]
pub const fn is_false(value: &bool) -> bool {
    !*value
}

/// Used purely for skipping serialization of values that are 1 by default.
#[inline]
pub const fn is_one(value: &usize) -> bool {
    *value == 1
}

/// Used to provide a default serde value of 1.
#[inline]
pub const fn one() -> usize {
    1
}