1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
//! Schema-aware adapters for the [`Document`](aws_smithy_types::Document) data model.
//!
//! The [`Document`](aws_smithy_types::Document), [`DiscriminatedDocument`](aws_smithy_types::DiscriminatedDocument), and [`DocumentSettings`](aws_smithy_types::DocumentSettings)
//! types live in `aws-smithy-types` (the dependency direction is
//! `aws-smithy-schema → aws-smithy-types`); import them from there. This
//! module supplies the schema-crate-only adapters that connect `Document`
//! with the [`ShapeSerializer`](crate::serde::ShapeSerializer) /
//! [`ShapeDeserializer`](crate::serde::ShapeDeserializer) machinery:
//!
//! - [`serializer`] — the [`DocumentShapeSerializer`], a
//! [`ShapeSerializer`](crate::serde::ShapeSerializer) implementation
//! that builds a [`Document`](aws_smithy_types::Document) tree from a
//! typed Smithy shape.
//! - [`deserializer`] — the [`DocumentShapeDeserializer`], a
//! [`ShapeDeserializer`](crate::serde::ShapeDeserializer) implementation
//! that walks a [`Document`](aws_smithy_types::Document) tree and
//! dispatches to consumer callbacks defined by generated `deserialize`
//! methods.
//! - [`discriminated_ext`] — [`DiscriminatedDocumentExt`], an extension
//! trait that bolts `Document.from_struct` / `Document.asShape` /
//! `Document.shape_type` onto
//! [`DiscriminatedDocument`](aws_smithy_types::DiscriminatedDocument)
//! (which itself lives in `aws-smithy-types` and so cannot reference
//! [`Schema`](crate::Schema) inherently).
//!
//! See the SEP "Document Type and Type Registries" for the full
//! specification.
pub use DocumentShapeDeserializer;
pub use DiscriminatedDocumentExt;
pub use DocumentShapeSerializer;