Skip to main content

PublicationBuiltinTopicData

Struct PublicationBuiltinTopicData 

Source
pub struct PublicationBuiltinTopicData {
Show 22 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 ownership_strength: i32, pub liveliness: LivelinessQosPolicy, pub deadline: DeadlineQosPolicy, pub lifespan: LifespanQosPolicy, 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 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,
}
Expand description

Discovered Publication / lokaler DataWriter — Subset.

Fields§

§key: Guid

Endpoint-GUID (= Writer-GUID).

§participant_key: Guid

GUID des Participants, dem der Writer gehoert.

§topic_name: String

Topic-Name (DDS-Topic, z.B. “ChatterTopic”).

§type_name: String

IDL-Type-Name (z.B. “std_msgs::String”).

§durability: DurabilityKind

Durability-QoS.

§reliability: ReliabilityQos

Reliability-QoS.

§ownership: OwnershipKind

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

§ownership_strength: i32

Ownership-Strength (Spec §2.2.3.24). Nur relevant wenn ownership == Exclusive; Default 0.

§liveliness: LivelinessQosPolicy

Liveliness-QoS (Spec §2.2.3.11).

§deadline: DeadlineQosPolicy

Deadline-QoS (Spec §2.2.3.7).

§lifespan: LifespanQosPolicy

Lifespan-QoS (Spec §2.2.3.16) — writer-only.

§partition: Vec<String>

Partition-QoS (Spec §2.2.3.13). Leere Liste = “default partition” (“”).

§user_data: Vec<u8>

UserData-QoS (Spec §2.2.3.1) — opaque sequence, Discovery- propagiert. Leerer Vec = nicht gesetzt.

§topic_data: Vec<u8>

TopicData-QoS (Spec §2.2.3.3) — opaque sequence, vom Topic via Pub-Discovery propagiert.

§group_data: Vec<u8>

GroupData-QoS (Spec §2.2.3.2) — opaque sequence, vom Publisher via Pub-Discovery propagiert.

§type_information: Option<Vec<u8>>

Type-Information (TypeIdentifier-Hashes + Dependencies, XTypes §7.6.3.2.2). Opaque bytes: die Struktur lebt in zerodds-types, aber wir transportieren den serialisierten Blob, um zirkulaere Crate-Abhaengigkeiten zu vermeiden.

§data_representation: Vec<i16>

Akzeptierte Data-Representations (0=XCDR1, 1=XML, 2=XCDR2, …). Spec: XTypes 1.3 §7.6.3.1.1 / RTPS 2.5 PID 0x0073. Default-Liste bei leer ist [XCDR1] per XTypes §7.6.3.1.2 — wir emittieren das PID immer explicit, damit Strict-Vendoren wie RTI 7.7.0 SEDP-matchen koennen.

§security_info: Option<EndpointSecurityInfo>

Endpoint-Security-Info (PID 0x1004, DDS-Security 1.1 §7.4.1.5). None bei Legacy-Peers ohne Security-PID. WP 4H-c matched darauf: Writer/Reader-Paare mit inkompatiblen Protection-Leveln werden abgelehnt.

§service_instance_name: Option<String>

PID_SERVICE_INSTANCE_NAME (DDS-RPC 1.0 §7.8.2) — logischer Service-Instance-Name eines RPC-Endpoints. None fuer gewoehnliche Pub/Sub-Topics.

§related_entity_guid: Option<Guid>

PID_RELATED_ENTITY_GUID (DDS-RPC 1.0 §7.8.2) — GUID des Pendant-Endpoints in einem RPC-Endpoint-Pair. Bei einem Request-Writer zeigt das auf den Reply-Reader desselben Requesters; bei einem Reply-Writer auf den Request-Reader desselben Repliers.

§topic_aliases: Option<Vec<String>>

PID_TOPIC_ALIASES (DDS-RPC 1.0 §7.8.2) — alternative Topic- Namen fuer Routing-/Compat-Layer. Reihenfolge ist signifikant.

§type_identifier: TypeIdentifier

PID_ZERODDS_TYPE_ID (Vendor-PID 0x8002) — XTypes-1.3 §7.3.4.2 TypeIdentifier des Writer-Type für XTypes-aware Reader-Match (XTypes §7.6.3.7 + DDS 1.4 §2.2.3 TypeConsistencyEnforcement).

Implementations§

Source§

impl PublicationBuiltinTopicData

Source

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

Encoded zu PL_CDR_LE-Bytes (mit 4-byte Encapsulation-Header). Output ist direkt als serialized_payload einer DATA- Submessage verwendbar.

§Errors

ValueOutOfRange wenn ein String laenger als u32::MAX ist.

Source

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

Decoded aus PL_CDR_LE-Bytes (mit Encapsulation-Header).

§Errors

UnexpectedEof bei zu kurzen Bytes, UnsupportedEncapsulation bei unbekanntem Encoding, ValueOutOfRange wenn Pflicht-PIDs fehlen oder Werte falsche Laenge haben.

Source§

impl PublicationBuiltinTopicData

Source

pub fn as_writer_qos(&self) -> WriterQos

Baut aus den Wire-Felder eine WriterQos.

Einschraenkung: Nur Durability + Reliability werden aus self uebernommen; alle anderen Policies bleiben auf ihren WriterQos::default()-Werten. Anwendungen, die gegen den discovered Peer matchen wollen, muessen dieser Einschraenkung bewusst sein — siehe Modul-Dokumentation.

Source

pub fn with_writer_qos(self, qos: &WriterQos) -> Self

Wendet eine vollstaendige WriterQos auf diesen Builtin-Topic- Data-Payload an, soweit Wire-Felder es erlauben. Policies, die (noch) nicht serialisiert werden, gehen verloren.

Trait Implementations§

Source§

impl Clone for PublicationBuiltinTopicData

Source§

fn clone(&self) -> PublicationBuiltinTopicData

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 PublicationBuiltinTopicData

Source§

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

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

impl PartialEq for PublicationBuiltinTopicData

Source§

fn eq(&self, other: &PublicationBuiltinTopicData) -> 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 Eq for PublicationBuiltinTopicData

Source§

impl StructuralPartialEq for PublicationBuiltinTopicData

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.