Skip to content

2.1.0 — name() on the dispatch enums

Choose a tag to compare

@fishloa fishloa released this 05 Jun 17:23
· 34 commits to main since this release
350b9b8

2.1.0 — name() on the dispatch enums

Small additive release: the declare_*! macros now generate an inherent
name() on all three dispatch enums, so labelling a table, descriptor, or
T2-MI payload no longer needs a hand-written variant match.

let event_table = event.table()?;
println!("pid={} {} v{}", event.pid(), event_table.name(), event.version().unwrap_or(0));
// pid=0x0012 EVENT_INFORMATION v3
  • AnyTable::name() / AnyDescriptor::name() / AnyPayload::name()
    the type's *Def::NAME ("EVENT_INFORMATION", "SHORT_EVENT",
    "BBFRAME", …); "UNKNOWN" for fallthrough variants, "CUSTOM" for
    runtime-registered descriptors.
  • si_dump / t2mi_dump examples simplified to match.

No breaking changes. All four crates released in lockstep at 2.1.0.

Full changelog: https://github.com/fishloa/rust-dvb/blob/main/dvb-si/CHANGELOG.md