dust_dds_derive

Crates.iodust_dds_derive
lib.rsdust_dds_derive
version0.11.0
sourcesrc
created_at2022-11-21 14:43:19.806151
updated_at2024-08-27 10:11:42.005111
descriptionDerive macro for `DdsType` and other traits from `dust-dds`
homepagehttps://s2e-systems.com/products/dust-dds
repositoryhttps://github.com/s2e-systems/dust-dds
max_upload_size
id720161
size74,019
Joao Rebelo (jrebelo)

documentation

README

Derive macro for DdsType

This package provides a derive macro for DdsType to support dust-dds.

DdsType can only be derived for structs, tuples and enums. For structs and tuples, the attribute #[dust_dds(key)] can be specified either on the whole type or on a subset of fields.

Example

A typical user DDS type will look like this:

use dust_dds::topic_definition::type_support::{DdsType}

#[derive(DdsType)]
struct HelloWorldType {
    #[dust_dds(key)]
    id: u8,
    msg: String,
}

Commit count: 3509

cargo fmt