Struct async_rustbus::rustbus_core::wire::marshal::traits::OptimizedMarshal[][src]

pub struct OptimizedMarshal<'a, E>(pub &'a [E])
where
    E: Copy + Marshal
;
Expand description

!!! This assumes that you are marshalling to the platforms byteorder !!!

It just memcpy’s the content of the array into the message. This is fine for all integer types, but you cannot use it for structs, even if they are copy! They might have padding to be correctly aligned in the slice. I would recommend to only use this for marshalling big integer arrays but I cannot express this in the type system cleanly so here is a comment.

Trait Implementations

If this returns true, it indicates that for implementing type T, Rust’s [T] is identical to DBus’s array format and can be copied into a message after aligning the first element. Read more

Appends the signature of the type to the SignatureBuffer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.