1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Software Name: its-client
// SPDX-FileCopyrightText: Copyright (c) 2016-2022 Orange
// SPDX-License-Identifier: MIT License
//
// This software is distributed under the MIT license, see LICENSE.txt file for more details.
//
// Author: Frédéric GARDES <frederic.gardes@orange.com> et al.
// Software description: This Intelligent Transportation Systems (ITS) [MQTT](https://mqtt.org/) client based on the [JSon](https://www.json.org) [ETSI](https://www.etsi.org/committee/its) specification transcription provides a ready to connect project for the mobility (connected and autonomous vehicles, road side units, vulnerable road users,...).
use crate::mqtt::topic::Topic;
use crate::reception::Reception;

#[derive(Clone, Debug, Eq, Hash, PartialEq)]
pub struct Item<T>
where
    T: Reception,
{
    pub topic: Topic,
    pub reception: T,
}

impl<T: Reception> Item<T> {
    pub fn new(topic: Topic, reception: T) -> Self {
        Item { topic, reception }
    }
}