Merge pull request #269 from mwilliammyers/feat/maybe-undefined

Add more trait implementations to MaybeUndefined
This commit is contained in:
Sunli 2020-09-20 09:48:58 +08:00 committed by GitHub
commit 0679afe29d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,5 @@
use crate::{registry, InputValueResult, InputValueType, Type, Value};
use serde::{Deserialize, Serialize};
use std::borrow::Cow;
/// Similar to `Option`, but it has three states, `undefined`, `null` and `x`.
@ -45,6 +46,7 @@ use std::borrow::Cow;
/// }
/// ```
#[allow(missing_docs)]
#[derive(Serialize, Deserialize, Clone, Debug)]
pub enum MaybeUndefined<T> {
Undefined,
Null,