Skip to main content

Subscriber

Struct Subscriber 

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

Subscriber — entity group for DataReaders.

Implementations§

Source§

impl Subscriber

Source

pub fn contains_reader(&self, handle: InstanceHandle) -> bool

Spec §2.2.2.2.1.10 — true if handle is a DataReader created via this Subscriber.

Source

pub fn begin_access(&self)

Spec §2.2.2.5.2.8 begin_access — marks the start of a coherent read set. Nesting is allowed; each call increments an internal counter, each end_access decrements it.

Source

pub fn end_access(&self) -> Result<()>

Spec §2.2.2.5.2.9 end_access — counterpart to begin_access.

§Errors

DdsError::PreconditionNotMet if end_access is called without a preceding begin_access.

Source

pub fn is_access_open(&self) -> bool

true if a group access is currently open.

Source

pub fn set_listener( &self, listener: Option<ArcSubscriberListener>, mask: StatusMask, )

Sets the SubscriberListener + StatusMask. None clears the slot. Spec §2.2.2.5.6.x set_listener.

Source

pub fn get_listener(&self) -> Option<ArcSubscriberListener>

Current listener clone.

Source

pub fn create_datareader<T: DdsType + Send + 'static>( &self, topic: &Topic<T>, qos: DataReaderQos, ) -> Result<DataReader<T>>

Creates a typed DataReader<T>.

§Errors

BadParameter on a type-name mismatch.

Trait Implementations§

Source§

impl Debug for Subscriber

Source§

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

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

impl Entity for Subscriber

Available on crate feature std only.
Source§

type Qos = SubscriberQos

QoS type for this entity (e.g. DomainParticipantQos, DataWriterQos, …).
Source§

fn get_qos(&self) -> Self::Qos

Returns the current QoS (clone). Spec §2.2.2.1.2 get_qos.
Source§

fn set_qos(&self, qos: Self::Qos) -> Result<()>

Changes the QoS. Before enable: everything allowed. After enable: only fields with “Changeable=YES” — otherwise an ImmutablePolicy error. Spec §2.2.2.1.2 set_qos. Read more
Source§

fn enable(&self) -> Result<()>

Enables the entity (idempotent). Spec §2.2.2.1.4 enable. Read more
Source§

fn entity_state(&self) -> Arc<EntityState>

Internal accessor — each impl returns its Arc<EntityState>.
Source§

fn is_enabled(&self) -> bool

True if the entity is already enabled.
Source§

fn get_status_condition(&self) -> StatusCondition

StatusCondition of this entity. Spec §2.2.2.1.6 get_status_condition.
Source§

fn get_status_changes(&self) -> StatusMask

Bitmask of the status kinds changed since the last read. Spec §2.2.2.1.5 get_status_changes.
Source§

fn get_instance_handle(&self) -> InstanceHandle

Local 64-bit identifier. Spec §2.2.2.1.7 get_instance_handle.

Auto Trait Implementations§

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.