Function coap_numbers::option::to_name

source ·
pub fn to_name(option: u16) -> Option<&'static str>
Expand description

Find the name for a CoAP option, if any is known

Returns the registered name for an option, or None if it is not known.

assert_eq!(to_name(URI_HOST), Some("Uri-Host"));
assert_eq!(to_name(65000), None);