Skip to main content

SubscriptionBuiltinTopicData

Struct SubscriptionBuiltinTopicData 

Source
pub struct SubscriptionBuiltinTopicData {
Show 23 fields pub key: Guid, pub participant_key: Guid, pub topic_name: String, pub type_name: String, pub durability: DurabilityKind, pub reliability: ReliabilityQos, pub ownership: OwnershipKind, pub liveliness: LivelinessQosPolicy, pub deadline: DeadlineQosPolicy, pub partition: Vec<String>, pub user_data: Vec<u8>, pub topic_data: Vec<u8>, pub group_data: Vec<u8>, pub type_information: Option<Vec<u8>>, pub data_representation: Vec<i16>, pub content_filter: Option<ContentFilterProperty>, pub security_info: Option<EndpointSecurityInfo>, pub service_instance_name: Option<String>, pub related_entity_guid: Option<Guid>, pub topic_aliases: Option<Vec<String>>, pub type_identifier: TypeIdentifier, pub unicast_locators: Vec<Locator>, pub multicast_locators: Vec<Locator>,
}
Expand description

Discovered Subscription / lokaler DataReader — Subset.

Wire-identical to [PublicationBuiltinTopicData] in phase 1; a separate type so the SEDP publications and subscriptions caches stay clearly distinguishable and extensions (e.g. expects_inline_qos, time_based_filter) are not pulled through the publication type.

Fields§

§key: Guid

Endpoint GUID (= reader GUID).

§participant_key: Guid

GUID of the participant the reader belongs to.

§topic_name: String

Topic name.

§type_name: String

IDL type name.

§durability: DurabilityKind

Durability-QoS.

§reliability: ReliabilityQos

Reliability-QoS.

§ownership: OwnershipKind

Ownership-QoS (Spec §2.2.3.23). Default Shared.

§liveliness: LivelinessQosPolicy

Liveliness-QoS (Spec §2.2.3.11).

§deadline: DeadlineQosPolicy

Deadline-QoS (Spec §2.2.3.7).

§partition: Vec<String>

Partition-QoS (Spec §2.2.3.13).

§user_data: Vec<u8>

UserData-QoS (Spec §2.2.3.1) — opaque sequence.

§topic_data: Vec<u8>

TopicData-QoS (Spec §2.2.3.3) — opaque sequence.

§group_data: Vec<u8>

GroupData-QoS (Spec §2.2.3.2) — opaque sequence.

§type_information: Option<Vec<u8>>

Type information as opaque bytes (XTypes §7.6.3.2.2).

§data_representation: Vec<i16>

Akzeptierte Data-Representations.

§content_filter: Option<ContentFilterProperty>

Content-filter property (DDSI-RTPS §9.6.3.4 Table 9.14). Only set if the reader was created as a ContentFilteredTopic.

§security_info: Option<EndpointSecurityInfo>

Endpoint security info (PID 0x1004, DDS-Security 1.1 §7.4.1.5). None for legacy peers. WP 4H-c matching checks writer/reader pairs for protection compatibility.

§service_instance_name: Option<String>

PID_SERVICE_INSTANCE_NAME (DDS-RPC 1.0 §7.8.2) — logical service-instance name of an RPC endpoint.

§related_entity_guid: Option<Guid>

PID_RELATED_ENTITY_GUID (DDS-RPC 1.0 §7.8.2) — GUID of the counterpart endpoint (e.g. reply reader → reply writer).

§topic_aliases: Option<Vec<String>>

PID_TOPIC_ALIASES (DDS-RPC 1.0 §7.8.2).

§type_identifier: TypeIdentifier

PID_ZERODDS_TYPE_ID (vendor PID 0x8002) — reader type identifier for XTypes-aware matching (see PublicationBuiltinTopicData).

§unicast_locators: Vec<Locator>

Endpoint unicast locators (DDSI-RTPS 2.5 §8.5.3.2: DiscoveredReaderData.readerProxy.unicastLocatorList). Where peers send user data to this reader endpoint. Empty = the peer falls back to the participant DEFAULT_UNICAST_LOCATOR from SPDP (§8.5.5). OpenDDS stores the real user locator exclusively here.

§multicast_locators: Vec<Locator>

Endpoint-Multicast-Locators (DDSI-RTPS 2.5 §8.5.3.2).

Implementations§

Source§

impl SubscriptionBuiltinTopicData

Source

pub fn as_reader_qos(&self) -> ReaderQos

Analogous to PublicationBuiltinTopicData::as_writer_qos for readers.

Limitation: only durability + reliability; the remaining policies at ReaderQos::default().

Source

pub fn with_reader_qos(self, qos: &ReaderQos) -> Self

Source§

impl SubscriptionBuiltinTopicData

Source

pub fn to_pl_cdr_le(&self) -> Result<Vec<u8>, WireError>

Encodes to PL_CDR_LE bytes (with a 4-byte encapsulation header).

Implemented directly (not delegated via [PublicationBuiltinTopicData]) so that extension PIDs that are writer-only (e.g. PID_LIFESPAN, PID_OWNERSHIP_STRENGTH) do not accidentally end up in the subscription payload.

§Errors

ValueOutOfRange if a string is longer than u32::MAX.

Source

pub fn from_pl_cdr_le(bytes: &[u8]) -> Result<Self, WireError>

Decoded from PL_CDR_LE bytes (with encapsulation header).

§Errors

UnexpectedEof on too-short bytes, UnsupportedEncapsulation on an unknown encoding, ValueOutOfRange if mandatory PIDs are missing.

Trait Implementations§

Source§

impl Clone for SubscriptionBuiltinTopicData

Source§

fn clone(&self) -> SubscriptionBuiltinTopicData

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 SubscriptionBuiltinTopicData

Source§

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

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

impl Eq for SubscriptionBuiltinTopicData

Source§

impl PartialEq for SubscriptionBuiltinTopicData

Source§

fn eq(&self, other: &SubscriptionBuiltinTopicData) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for SubscriptionBuiltinTopicData

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> 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 = 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.