pub trait DeserializeArray: Deserialize {
// Provided method
fn deserialize_array(
parcel: &BorrowedParcel<'_>,
) -> Result<Option<Vec<Self>>, StatusCode> { ... }
}
Expand description
Helper trait for types that can be deserialized as arrays.
Defaults to calling Deserialize::deserialize() manually for every element,
but can be overridden for custom implementations like readByteArray
.
Provided Methods§
Sourcefn deserialize_array(
parcel: &BorrowedParcel<'_>,
) -> Result<Option<Vec<Self>>, StatusCode>
fn deserialize_array( parcel: &BorrowedParcel<'_>, ) -> Result<Option<Vec<Self>>, StatusCode>
Deserialize an array of type from the given parcel.
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.