coap-lite 0.13.3

A lightweight CoAP message manipulation crate, ideal for embedded environments.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[cfg(feature = "log")]
macro_rules! coap_log {
    (info, $($arg:expr),*) => { log::info!($($arg),*); };
    (debug, $($arg:expr),*) => { log::debug!($($arg),*); };
}

#[cfg(not(feature = "log"))]
macro_rules! coap_log {
    ($level:ident, $($arg:expr),*) => { $( let _ = $arg; )* }
}

macro_rules! coap_info {
    ($($arg:expr),*) => (coap_log!(info, $($arg),*));
}

macro_rules! coap_debug {
    ($($arg:expr),*) => (coap_log!(debug, $($arg),*));
}