binder::binder_impl

Trait DeserializeArray

Source
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§

Source

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.

Implementations on Foreign Types§

Source§

impl DeserializeArray for Option<String>

Source§

impl DeserializeArray for bool

Source§

impl DeserializeArray for f32

Source§

impl DeserializeArray for f64

Source§

impl DeserializeArray for i8

Source§

impl DeserializeArray for i16

Source§

impl DeserializeArray for i32

Source§

impl DeserializeArray for i64

Source§

impl DeserializeArray for u8

Source§

impl DeserializeArray for u16

Source§

impl DeserializeArray for u32

Source§

impl DeserializeArray for u64

Source§

impl DeserializeArray for String

Source§

impl<T: DeserializeArray, const N: usize> DeserializeArray for [T; N]

Source§

impl<T: DeserializeOption> DeserializeArray for Option<T>

Implementors§