Do not serialize _non_exhaustive field

This commit is contained in:
Artem Vorotnikov
2019-10-03 14:32:06 +03:00
committed by Tim
parent e91005855c
commit 014c209b8e
2 changed files with 4 additions and 0 deletions

View File

@@ -36,6 +36,7 @@ pub struct Context {
/// users can trace related actions across a distributed system.
pub trace_context: trace::Context,
#[doc(hidden)]
#[cfg_attr(feature = "serde1", serde(skip_serializing, default))]
pub(crate) _non_exhaustive: (),
}

View File

@@ -73,6 +73,7 @@ pub struct Request<T> {
/// The request body.
pub message: T,
#[doc(hidden)]
#[cfg_attr(feature = "serde1", serde(skip_serializing, default))]
_non_exhaustive: (),
}
@@ -85,6 +86,7 @@ pub struct Response<T> {
/// The response body, or an error if the request failed.
pub message: Result<T, ServerError>,
#[doc(hidden)]
#[cfg_attr(feature = "serde1", serde(skip_serializing, default))]
_non_exhaustive: (),
}
@@ -105,6 +107,7 @@ pub struct ServerError {
/// A message describing more detail about the error that occurred.
pub detail: Option<String>,
#[doc(hidden)]
#[cfg_attr(feature = "serde1", serde(skip_serializing, default))]
_non_exhaustive: (),
}