dimas_com/enums/
communicator_implementations.rs1#[doc(hidden)]
4extern crate alloc;
5
6use alloc::sync::Arc;
7use zenoh::Session;
8
9use crate::traits::CommunicatorImplementationMethods;
10
11#[derive(Debug)]
13pub enum CommunicatorImplementation {
14 Zenoh(crate::zenoh::Communicator),
16}
17
18impl CommunicatorImplementationMethods for CommunicatorImplementation {}
19
20impl CommunicatorImplementation {
21 #[must_use]
23 #[allow(clippy::match_wildcard_for_single_variants)]
24 pub fn session(&self) -> Arc<Session> {
25 match self {
26 Self::Zenoh(communicator) => communicator.session(),
27 }
28 }
29}