binder::binder_impl

Trait SerializeArray

Source
pub trait SerializeArray: Serialize + Sized {
    // Provided method
    fn serialize_array(
        slice: &[Self],
        parcel: &mut BorrowedParcel<'_>,
    ) -> Result<(), StatusCode> { ... }
}
Expand description

Helper trait for types that can be serialized as arrays. Defaults to calling Serialize::serialize() manually for every element, but can be overridden for custom implementations like writeByteArray.

Provided Methods§

Source

fn serialize_array( slice: &[Self], parcel: &mut BorrowedParcel<'_>, ) -> Result<(), StatusCode>

Serialize an array of this type into 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 SerializeArray for &str

Source§

impl SerializeArray for bool

Source§

impl SerializeArray for f32

Source§

fn serialize_array( slice: &[Self], parcel: &mut BorrowedParcel<'_>, ) -> Result<(), StatusCode>

Source§

impl SerializeArray for f64

Source§

fn serialize_array( slice: &[Self], parcel: &mut BorrowedParcel<'_>, ) -> Result<(), StatusCode>

Source§

impl SerializeArray for i8

Source§

fn serialize_array( slice: &[Self], parcel: &mut BorrowedParcel<'_>, ) -> Result<(), StatusCode>

Source§

impl SerializeArray for i16

Source§

fn serialize_array( slice: &[Self], parcel: &mut BorrowedParcel<'_>, ) -> Result<(), StatusCode>

Source§

impl SerializeArray for i32

Source§

fn serialize_array( slice: &[Self], parcel: &mut BorrowedParcel<'_>, ) -> Result<(), StatusCode>

Source§

impl SerializeArray for i64

Source§

fn serialize_array( slice: &[Self], parcel: &mut BorrowedParcel<'_>, ) -> Result<(), StatusCode>

Source§

impl SerializeArray for u8

Source§

fn serialize_array( slice: &[Self], parcel: &mut BorrowedParcel<'_>, ) -> Result<(), StatusCode>

Source§

impl SerializeArray for u16

Source§

fn serialize_array( slice: &[Self], parcel: &mut BorrowedParcel<'_>, ) -> Result<(), StatusCode>

Source§

impl SerializeArray for u32

Source§

fn serialize_array( slice: &[Self], parcel: &mut BorrowedParcel<'_>, ) -> Result<(), StatusCode>

Source§

impl SerializeArray for u64

Source§

fn serialize_array( slice: &[Self], parcel: &mut BorrowedParcel<'_>, ) -> Result<(), StatusCode>

Source§

impl SerializeArray for String

Source§

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

Source§

impl<T: SerializeOption> SerializeArray for Option<T>

Implementors§