[][src]Trait spectrusty::bus::SerializeDynDevice

pub trait SerializeDynDevice {
    pub fn serialize_dyn_device<T, S>(
        device: &Box<dyn NamedBusDevice<T, Timestamp = T, NextDevice = NullDevice<T>> + 'static, Global>,
        serializer: S
    ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
    where
        T: 'static + TimestampOps + Serialize,
        S: Serializer
; }

This trait needs to be implemented by a type provided to DynamicSerdeBus as a parameter S, to serialize dynamic devices.

Required methods

pub fn serialize_dyn_device<T, S>(
    device: &Box<dyn NamedBusDevice<T, Timestamp = T, NextDevice = NullDevice<T>> + 'static, Global>,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    T: 'static + TimestampOps + Serialize,
    S: Serializer
[src]

This function should serialize the provided dynamic device.

The serialized form of the device depends completely on the implementation of this function, however it should probably include some device identifier along with the device data.

Loading content...

Implementors

Loading content...