libits_client/analyse/
item.rs

1// Software Name: its-client
2// SPDX-FileCopyrightText: Copyright (c) 2016-2022 Orange
3// SPDX-License-Identifier: MIT License
4//
5// This software is distributed under the MIT license, see LICENSE.txt file for more details.
6//
7// Author: Frédéric GARDES <frederic.gardes@orange.com> et al.
8// 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,...).
9use crate::mqtt::topic::Topic;
10use crate::reception::Reception;
11
12#[derive(Clone, Debug, Eq, Hash, PartialEq)]
13pub struct Item<T>
14where
15    T: Reception,
16{
17    pub topic: Topic,
18    pub reception: T,
19}
20
21impl<T: Reception> Item<T> {
22    pub fn new(topic: Topic, reception: T) -> Self {
23        Item { topic, reception }
24    }
25}