mirror of
https://github.com/chirpstack/chirpstack.git
synced 2025-05-02 09:03:08 +00:00
Add Clone and Copy derive to Prefix types.
This commit is contained in:
parent
cfadb9c78a
commit
f513cacab5
@ -10,6 +10,7 @@ use serde::{
|
|||||||
pub mod error;
|
pub mod error;
|
||||||
|
|
||||||
/// Configuration.
|
/// Configuration.
|
||||||
|
#[derive(Default, Clone)]
|
||||||
pub struct Filters {
|
pub struct Filters {
|
||||||
/// DevAddr prefixes.
|
/// DevAddr prefixes.
|
||||||
pub dev_addr_prefixes: Vec<DevAddrPrefix>,
|
pub dev_addr_prefixes: Vec<DevAddrPrefix>,
|
||||||
@ -99,6 +100,7 @@ pub fn matches(phy_payload: &[u8], config: &Filters) -> bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// DevAddr prefix.
|
/// DevAddr prefix.
|
||||||
|
#[derive(Clone, Copy)]
|
||||||
pub struct DevAddrPrefix([u8; 4], u32);
|
pub struct DevAddrPrefix([u8; 4], u32);
|
||||||
|
|
||||||
impl DevAddrPrefix {
|
impl DevAddrPrefix {
|
||||||
@ -194,6 +196,7 @@ impl<'de> Visitor<'de> for DevAddrPrefixVisitor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// JoinEUI prefix.
|
/// JoinEUI prefix.
|
||||||
|
#[derive(Clone, Copy)]
|
||||||
pub struct EuiPrefix([u8; 8], u32);
|
pub struct EuiPrefix([u8; 8], u32);
|
||||||
|
|
||||||
impl EuiPrefix {
|
impl EuiPrefix {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user