Crates.io | dust_dds_derive |
lib.rs | dust_dds_derive |
version | 0.11.0 |
source | src |
created_at | 2022-11-21 14:43:19.806151 |
updated_at | 2024-08-27 10:11:42.005111 |
description | Derive macro for `DdsType` and other traits from `dust-dds` |
homepage | https://s2e-systems.com/products/dust-dds |
repository | https://github.com/s2e-systems/dust-dds |
max_upload_size | |
id | 720161 |
size | 74,019 |
DdsType
This package provides a derive macro for DdsType
to support dust-dds.
DdsType
can only be derived for struct
s, tuples and enum
s. For struct
s and tuples, the attribute #[dust_dds(key)]
can be specified either on the whole type or on a subset of fields.
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,
}