chirpstack/api/rust/src/integration.rs
Orne Brocaar 3829f591e4 Add expires_at to queue-items (unicast & multicast).
This makes it possible to automatically remove items from the queue in
case the expires_at timestamp has reached. This field is optional and
the default remains to never expire queue-items.
2024-09-17 11:54:29 +01:00

40 lines
1.2 KiB
Rust
Vendored

include!(concat!(env!("OUT_DIR"), "/integration/integration.rs"));
#[cfg(feature = "json")]
include!(concat!(
env!("OUT_DIR"),
"/integration/integration.serde.rs"
));
#[allow(clippy::from_over_into)]
impl Into<String> for LogLevel {
fn into(self) -> String {
match self {
LogLevel::Info => "INFO",
LogLevel::Warning => "WARNING",
LogLevel::Error => "ERROR",
}
.to_string()
}
}
#[allow(clippy::from_over_into)]
impl Into<String> for LogCode {
fn into(self) -> String {
match self {
LogCode::Unknown => "UNKNOWN",
LogCode::DownlinkPayloadSize => "DOWNLINK_PAYLOAD_SIZE",
LogCode::UplinkCodec => "UPLINK_CODEC",
LogCode::DownlinkCodec => "DOWNLINK_CODEC",
LogCode::Otaa => "OTAA",
LogCode::UplinkFCntReset => "UPLINK_F_CNT_RESET",
LogCode::UplinkMic => "UPLINK_MIC",
LogCode::UplinkFCntRetransmission => "UPLINK_F_CNT_RETRANSMISSION",
LogCode::DownlinkGateway => "DOWNLINK_GATEWAY",
LogCode::RelayNewEndDevice => "RELAY_NEW_END_DEVICE",
LogCode::FCntDown => "F_CNT_DOWN",
LogCode::Expired => "EXPIRED",
}
.to_string()
}
}