box-open-sdk 0.4.1

Box API client for Rust (open source, community, punk rock) — typed models, async managers, and a reqwest runtime with retry, backoff, and token refresh.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
// Code generated by box-gantry. DO NOT EDIT.
use serde::{Deserialize, Deserializer};

/// Deserialize a present field (value or `null`) into the inner `Option`,
/// wrapping in `Some` so a present `null` reads as `Some(None)` and an absent
/// field (via `#[serde(default)]`) reads as `None`.
pub(crate) fn double_option<'de, T, D>(deserializer: D) -> Result<Option<Option<T>>, D::Error>
where
    T: Deserialize<'de>,
    D: Deserializer<'de>,
{
    Deserialize::deserialize(deserializer).map(Some)
}