Skip to main content

Topic

Struct Topic 

Source
pub struct Topic<T> { /* private fields */ }
Expand description

A DDS topic (DDS 1.4, 2.2.2.3.2): a name and the type of its samples, which are of Rust type T: a TopicType the program was built with, or DynamicData of a type known at run time (DomainParticipant::create_dynamic_topic). Writers and readers match by topic name and type name, or by type assignability for registered types.

Implementations§

Source§

impl<T> Topic<T>

Source

pub fn name(&self) -> &str

The topic name.

Source

pub fn inconsistent_topic_status(&self) -> InconsistentTopicStatus

The INCONSISTENT_TOPIC status (DDS 1.4, 2.2.4.1): the writers and readers of this topic found in other participants whose types are not consistent with those of the local ones. Reading it resets total_count_change.

Source

pub fn set_listener( &self, listener: impl TopicListener + 'static, mask: StatusMask, )

Sets the listener of the topic (set_listener), replacing any earlier one: it is called for INCONSISTENT_TOPIC when mask has it. The topics of one name in a participant share their listener.

Source

pub fn clear_listener(&self)

Removes the listener of the topic.

Source

pub fn type_name(&self) -> &str

The type name: T::TYPE_NAME for a TopicType, the name of the DynamicType otherwise.

Trait Implementations§

Source§

impl<T> Clone for Topic<T>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T> Debug for Topic<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T> TopicDescription<T> for Topic<T>

Source§

fn get_name(&self) -> &str

The name.
Source§

fn get_type_name(&self) -> &str

The type name.

Auto Trait Implementations§

§

impl<T> !RefUnwindSafe for Topic<T>

§

impl<T> !UnwindSafe for Topic<T>

§

impl<T> Forget for Topic<T>

§

impl<T> Freeze for Topic<T>
where *const u8 is !null: Freeze, PhantomData<u8>: Freeze, *const ArcInner<Shared> is !null: Freeze, PhantomData<ArcInner<Shared>>: Freeze, *const ArcInner<dyn SampleType<T>> is !null: Freeze, PhantomData<ArcInner<dyn SampleType<T>>>: Freeze,

§

impl<T> Move for Topic<T>

§

impl<T> Send for Topic<T>
where RawVecInner: Send, Arc<Shared>: Send, Arc<dyn SampleType<T>>: Send,

§

impl<T> Sync for Topic<T>
where RawVecInner: Sync, Arc<Shared>: Sync, Arc<dyn SampleType<T>>: Sync,

§

impl<T> Unpin for Topic<T>
where *const u8 is !null: Unpin, Arc<Shared>: Unpin, Arc<dyn SampleType<T>>: Unpin,

§

impl<T> UnsafeUnpin for Topic<T>
where *const u8 is !null: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, *const ArcInner<Shared> is !null: UnsafeUnpin, PhantomData<ArcInner<Shared>>: UnsafeUnpin, *const ArcInner<dyn SampleType<T>> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn SampleType<T>>>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.