forked from Orange-OpenSource/its-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rust: add payload trait in message mod
Signed-off-by: Nicolas Buffon <[email protected]>
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,6 @@ | |
// Author: Nicolas BUFFON <[email protected]> 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,...). | ||
|
||
pub(crate) mod payload; | ||
|
||
enum Message {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// 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: Nicolas BUFFON <[email protected]> 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::mobility::mobile::Mobile; | ||
|
||
pub trait Payload { | ||
fn get_type(&self) -> &str; | ||
|
||
fn appropriate(&mut self); | ||
|
||
fn as_mobile(&self) -> Result<&dyn Mobile, &'static str>; | ||
} |