pub trait DeserializableShape: Sized {
// Required method
fn deserialize(
deserializer: &mut dyn ShapeDeserializer,
) -> Result<Self, DeserializeError>;
}Expand description
An operation input that can be read from a [ShapeDeserializer].
The runtime deserializes inputs generically: DynUpgrade and
its streaming counterpart are written once over Op::Input: DeserializableShape, so every
generated input implements this trait. It returns DeserializeError so a builder’s typed
constraint violation reaches the protocol renderer as
DeserializeError::ConstraintViolation and becomes the modeled validation response instead
of collapsing into a generic parse failure.
Generated inputs walk their schema into the internal builder and then build(), so constraint
validation keeps happening in one place.
Required Methods§
Sourcefn deserialize(
deserializer: &mut dyn ShapeDeserializer,
) -> Result<Self, DeserializeError>
fn deserialize( deserializer: &mut dyn ShapeDeserializer, ) -> Result<Self, DeserializeError>
Reads Self from deserializer.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.