zerodds-cdr-derive

What it was

The procedural macro #[derive(DdsType)]: for an annotated Rust struct it emitted an impl zerodds_dcps::DdsType that encoded and decoded XCDR2 (OMG XTypes 1.3 §7.4).

Replacement in 1.0.0-rc.7

None. 1.0.0-rc.7 has no derive macro. The type is declared in IDL and generated at build time by zerodds-build in build.rs; Config::dds_type_impls(true) writes the impl zerodds_dcps::DdsType per type.

[build-dependencies]
zerodds-build = "1.0.0-rc.7"
// build.rs
fn main() -> Result<(), zerodds_build::Error> {
    zerodds_build::Config::new()
        .dds_type_impls(true)
        .compile(&["idl/Robot.idl"])
}

Configuration and the other options: zerodds-build.

Migration

The list of removed crates and the migration to their successors: CHANGELOG, [1.0.0-rc.7], section “Removed”.

zerodds-cdr-derive

Was die Crate war

Das prozedurale Makro #[derive(DdsType)]: Für einen annotierten Rust-struct erzeugte es ein impl zerodds_dcps::DdsType, das XCDR2 kodierte und dekodierte (OMG XTypes 1.3 §7.4).

Ersatz in 1.0.0-rc.7

Keiner. 1.0.0-rc.7 hat kein Derive-Makro. Der Typ wird in IDL deklariert und zur Bauzeit von zerodds-build in build.rs erzeugt; Config::dds_type_impls(true) schreibt impl zerodds_dcps::DdsType je Typ.

[build-dependencies]
zerodds-build = "1.0.0-rc.7"
// build.rs
fn main() -> Result<(), zerodds_build::Error> {
    zerodds_build::Config::new()
        .dds_type_impls(true)
        .compile(&["idl/Robot.idl"])
}

Konfiguration und die übrigen Optionen: zerodds-build.

Migration

Die Liste der entfallenen Crates und die Migration zu ihren Nachfolgern: CHANGELOG, [1.0.0-rc.7], Abschnitt „Removed“.