shardline-protocol 1.0.0

Protocol-facing hashes, ranges, secrets, and token types for Shardline.
Documentation
1
2
3
4
5
6
7
8
9
/// Parses a boolean value from common operator-friendly strings.
#[must_use]
pub fn parse_bool(value: &str) -> Option<bool> {
    match value {
        "true" | "1" | "yes" | "on" => Some(true),
        "false" | "0" | "no" | "off" => Some(false),
        _other => None,
    }
}