namib-project / libcoap-rs

Rust bindings to and wrapper around the libcoap C library
BSD 2-Clause "Simplified" License
5 stars 1 forks source link

Provide content type number as field in CoapContentFormat::Other #16

Open pulsastrix opened 2 months ago

pulsastrix commented 2 months ago
          Hmm, not really related to this PR, but could you also have `Other` accept the respective Content-Format value here?

_Originally posted by @JKRhb in https://github.com/namib-project/libcoap-rs/pull/15#discussion_r1662262582_

pulsastrix commented 1 month ago

Apparently, one possible way of implementing this could also be replacing num_derive with num_enum, which seems to be the more widely used crate for this purpose anyways.

num_enum allows creating a variant that captures all other cases using the #[num_enum(catch_all)] attribute.