use crate::dds_async::{
content_filtered_topic::ContentFilteredTopicAsync, domain_participant::DomainParticipantAsync,
topic::TopicAsync,
};
use alloc::string::String;
pub enum TopicDescriptionAsync {
Topic(TopicAsync),
ContentFilteredTopic(ContentFilteredTopicAsync),
}
impl Clone for TopicDescriptionAsync {
fn clone(&self) -> Self {
match self {
Self::Topic(arg0) => Self::Topic(arg0.clone()),
Self::ContentFilteredTopic(arg0) => Self::ContentFilteredTopic(arg0.clone()),
}
}
}
impl TopicDescriptionAsync {
#[tracing::instrument(skip(self))]
pub fn get_participant(&self) -> DomainParticipantAsync {
match self {
Self::Topic(t) => t.get_participant(),
Self::ContentFilteredTopic(t) => t.get_participant(),
}
}
#[tracing::instrument(skip(self))]
pub fn get_type_name(&self) -> String {
match self {
Self::Topic(t) => t.get_type_name(),
Self::ContentFilteredTopic(t) => t.get_type_name(),
}
}
#[tracing::instrument(skip(self))]
pub fn get_name(&self) -> String {
match self {
Self::Topic(t) => t.get_name(),
Self::ContentFilteredTopic(t) => t.get_name(),
}
}
}