rust-s3 0.23.0-beta2

Tiny Rust library for working with Amazon S3 and compatible object storage APIs. WASM compatible
Documentation
1
2
3
4
5
6
7
8
9
10
use serde::de::*;

pub fn bool_deserializer<'de, D>(d: D) -> Result<bool, D::Error> where D: Deserializer<'de> {
    let s = String::deserialize(d)?;
    match &s[..] {
        "true" => Ok(true),
        "false" => Ok(false),
        other => Err(D::Error::custom(format!("got {}, but expected `true` or `false`", other))),
    }
}