pub trait TopicDescription {
// Required methods
fn get_type_name(&self) -> &str;
fn get_name(&self) -> &str;
fn get_participant(&self) -> &DomainParticipant;
}Expand description
TopicDescription trait — base interface for anything a
DataReader (typed via T) can obtain samples from.
Spec reference: OMG DDS 1.4 §2.2.2.3.1 “TopicDescription is the
most abstract description of a topic. It encapsulates the
information that is common to all the kinds of topic that can be
used: Topic, ContentFilteredTopic, MultiTopic.”
The trait is object-safe — we want to be able to return it as
&dyn TopicDescription from lookup_topicdescription and
find_topic.
Required Methods§
Sourcefn get_type_name(&self) -> &str
fn get_type_name(&self) -> &str
Type name (e.g. "std_msgs::msg::String").
Spec §2.2.2.3.1 get_type_name.
Sourcefn get_participant(&self) -> &DomainParticipant
fn get_participant(&self) -> &DomainParticipant
Owning participant.
Spec §2.2.2.3.1 get_participant.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".