Skip to main content

opentalk_roomserver_types_echo/
command.rs

1// SPDX-License-Identifier: EUPL-1.2
2// SPDX-FileCopyrightText: OpenTalk Team <mail@opentalk.eu>
3
4use opentalk_roomserver_signaling::signaling_module::CreateReplica;
5use serde::{Deserialize, Serialize};
6
7use crate::event::EchoEvent;
8
9#[derive(Deserialize, Serialize, Debug)]
10#[serde(tag = "action", rename_all = "snake_case")]
11pub enum EchoCommand {
12    /// A ping command to which the module responds with a [`Pong`](crate::event::EchoEvent::Pong)
13    /// event.
14    Ping,
15}
16
17impl CreateReplica<EchoEvent> for EchoCommand {
18    fn replicate(&self) -> Option<EchoEvent> {
19        None
20    }
21}