[−][src]Macro async_coap::write_options
Helper macro that assists with writing correct implementations of SendDesc::write_options
.
Example
fn write_options( &self, msg: &mut dyn OptionInsert, socket_addr: &IC::SocketAddr, start: Bound<OptionNumber>, end: Bound<OptionNumber>, ) -> Result<(), Error> { write_options!((msg, socket_addr, start, end) { // Note that the options **MUST** be listed **in numerical order**, // otherwise the behavior will be undefined! URI_HOST => Some("example.com").into_iter(), URI_PORT => Some(1234).into_iter(), URI_PATH => vec!["a","b","c"].into_iter(), }) }