Skip to main content

Subscriber

Struct Subscriber 

Source
pub struct Subscriber { /* private fields */ }
Expand description

A DDS subscriber (DDS 1.4, 2.2.2.5.1): creates data readers.

Implementations§

Source§

impl Subscriber

Source

pub fn qos(&self) -> &SubscriberQos

The subscriber’s QoS.

Source

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

Sets the subscriber’s listener (set_listener), replacing any earlier one: it is called for DATA_ON_READERS, and for the statuses in mask of its readers that their own listeners do not take (DDS 1.4, 2.2.4.3). See SubscriberListener.

Source

pub fn clear_listener(&self)

Removes the subscriber’s listener.

Source

pub fn notify_datareaders(&self)

Calls on_data_available of the listeners of its readers that have new data (notify_datareaders, DDS 1.4, 2.2.2.5.2.8): from on_data_on_readers, to have each reader handle its own.

Source

pub fn same_as(&self, other: &Subscriber) -> bool

Whether self and other are handles of the same subscriber.

Source

pub fn create_datareader<T>( &self, topic: &impl TopicDescription<T>, ) -> Result<DataReader<T>>

Creates a reader for topic with the default QoS: BEST_EFFORT, KEEP_LAST(1), VOLATILE. topic is a Topic or a ContentFilteredTopic.

Source

pub fn create_datareader_with_qos<T>( &self, topic: &impl TopicDescription<T>, qos: DataReaderQos, ) -> Result<DataReader<T>>

Creates a reader for topic.

A RELIABLE reader gets the samples of each writer in order and without gaps, asking for those lost on the way; it matches only RELIABLE writers. A BEST_EFFORT reader takes what arrives, in order, and matches any writer.

Source

pub fn create_datareader_with_listener<T: 'static>( &self, topic: &impl TopicDescription<T>, qos: DataReaderQos, listener: impl DataReaderListener<T> + 'static, mask: StatusMask, ) -> Result<DataReader<T>>

Creates a reader for topic with a listener for the statuses in mask, set before the reader is matched, so that it is told of the writers already there and of the samples they kept (DDS 1.4, 2.2.2.5.2.5).

Trait Implementations§

Source§

impl Clone for Subscriber

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 Debug for Subscriber

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Subscriber

§

impl !UnwindSafe for Subscriber

§

impl Forget for Subscriber

§

impl Freeze for Subscriber
where *const ArcInner<Shared> is !null: Freeze, PhantomData<ArcInner<Shared>>: Freeze, *const ArcInner<SubscriberEntity> is !null: Freeze, PhantomData<ArcInner<SubscriberEntity>>: Freeze,

§

impl Move for Subscriber

§

impl Send for Subscriber
where Arc<Shared>: Send, Arc<SubscriberEntity>: Send,

§

impl Sync for Subscriber
where Arc<Shared>: Sync, Arc<SubscriberEntity>: Sync,

§

impl Unpin for Subscriber
where Arc<Shared>: Unpin, Arc<SubscriberEntity>: Unpin,

§

impl UnsafeUnpin for Subscriber
where *const ArcInner<Shared> is !null: UnsafeUnpin, PhantomData<ArcInner<Shared>>: UnsafeUnpin, *const ArcInner<SubscriberEntity> is !null: UnsafeUnpin, PhantomData<ArcInner<SubscriberEntity>>: 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.