pub trait JsonStructure: JsonDeserialize {
// Provided method
fn deserialize_structure<'bytes, B: BytesLike<'bytes>, S: Stack>(
json: B,
) -> Result<Self, JsonError<'bytes, B, S>> { ... }
}
Expand description
A structure which can deserialized from a JSON serialization.
Provided Methods§
Sourcefn deserialize_structure<'bytes, B: BytesLike<'bytes>, S: Stack>(
json: B,
) -> Result<Self, JsonError<'bytes, B, S>>
fn deserialize_structure<'bytes, B: BytesLike<'bytes>, S: Stack>( json: B, ) -> Result<Self, JsonError<'bytes, B, S>>
Deserialize this structure from an JSON-serialized blob.
This will deserialize the structure present without limitation. If a bound is desired, bound the length of input or deserialize into types which define bounds.
This method SHOULD NOT be overriden.
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.
Implementations on Foreign Types§
impl<T: 'static + Default + JsonDeserialize, const N: usize> JsonStructure for [T; N]
impl<T: 'static + JsonDeserialize> JsonStructure for Vec<T>
Available on crate feature
alloc
only.