pub struct Topic { /* private fields */ }
Expand description
DDS Topic
DDS Specification, Section 2.2.1.2 Conceptual outline:
Topic objects conceptually fit between publications and subscriptions. Publications must be known in such a way that subscriptions can refer to them unambiguously. A Topic is meant to fulfill that purpose: it associates a name (unique in the > domain), a data-type, and QoS related to the data itself.
Topics can be created (or found) using a DomainParticipant
.
Examples
use rustdds::dds::DomainParticipant;
use rustdds::dds::qos::QosPolicyBuilder;
use rustdds::dds::Topic;
use rustdds::dds::data_types::TopicKind;
let domain_participant = DomainParticipant::new(0).unwrap();
let qos = QosPolicyBuilder::new().build();
let topic = domain_participant
.create_topic("some_topic".to_string(), "SomeType".to_string(), &qos, TopicKind::WithKey)
.unwrap();
Implementations
Trait Implementations
sourceimpl HasQoSPolicy for Topic
impl HasQoSPolicy for Topic
fn qos(&self) -> QosPolicies
sourceimpl TopicDescription for Topic
impl TopicDescription for Topic
Implements some default topic interfaces functions defined in DDS spec
sourcefn participant(&self) -> Option<DomainParticipant>
fn participant(&self) -> Option<DomainParticipant>
Gets DomainParticipant if it is still alive.
Auto Trait Implementations
impl RefUnwindSafe for Topic
impl Send for Topic
impl Sync for Topic
impl Unpin for Topic
impl UnwindSafe for Topic
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more