pub struct TopicBuiltinTopicData {
pub key: Guid,
pub name: String,
pub type_name: String,
pub durability: DurabilityKind,
pub reliability: ReliabilityKind,
}Expand description
Sample type of the DCPSTopic built-in topic (DDS 1.4 §2.2.5.2).
Minimal subset (topic name + type name + durability + reliability) from which end-user tooling can render the discovered topics. The full topic-QoS table (DDS 1.4 §2.2.5.2) remains an optional extension.
Fields§
§key: GuidStable identity of the topic entry (synthetic, from a hash of
topic name + type name; see Self::synthesize_key).
name: StringTopic name (e.g. "ChatterTopic").
type_name: StringIDL type name.
durability: DurabilityKindDurability QoS kind.
reliability: ReliabilityKindReliability QoS kind.
Implementations§
Source§impl TopicBuiltinTopicData
impl TopicBuiltinTopicData
Sourcepub fn synthesize_key(topic: &str, type_name: &str) -> Guid
pub fn synthesize_key(topic: &str, type_name: &str) -> Guid
Produces a synthetic GUID key from topic + type name. Stable:
the same topic+type yields the same key. This makes the
DCPSTopic built-in topic deliver idempotent updates instead of
insert-per-endpoint (spec §2.2.5.2).
Sourcepub fn from_publication(w: &PublicationBuiltinTopicData) -> Self
pub fn from_publication(w: &PublicationBuiltinTopicData) -> Self
Constructs from a discovered publication wire data type.
Sourcepub fn from_subscription(w: &SubscriptionBuiltinTopicData) -> Self
pub fn from_subscription(w: &SubscriptionBuiltinTopicData) -> Self
Constructs from a discovered subscription wire data type.
Trait Implementations§
Source§impl BuiltinTopic for TopicBuiltinTopicData
impl BuiltinTopic for TopicBuiltinTopicData
Source§const TOPIC_NAME: &'static str = TOPIC_NAME_DCPS_TOPIC
const TOPIC_NAME: &'static str = TOPIC_NAME_DCPS_TOPIC
Source§impl Clone for TopicBuiltinTopicData
impl Clone for TopicBuiltinTopicData
Source§fn clone(&self) -> TopicBuiltinTopicData
fn clone(&self) -> TopicBuiltinTopicData
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl DdsType for TopicBuiltinTopicData
impl DdsType for TopicBuiltinTopicData
Source§const TYPE_NAME: &'static str = "DDS::TopicBuiltinTopicData"
const TYPE_NAME: &'static str = "DDS::TopicBuiltinTopicData"
"std_msgs::String").
Must match the peer type name exactly (strict matching).Source§const HAS_KEY: bool = true
const HAS_KEY: bool = true
true if the topic type is keyed (at least one member with
a @key annotation). Default false — the caller (proc-macro)
overrides this for keyed types and also implements
Self::encode_key_holder_be. Read moreSource§const KEY_HOLDER_MAX_SIZE: Option<usize>
const KEY_HOLDER_MAX_SIZE: Option<usize>
None = not keyed or unbounded
(MD5 path). Some(n) with n <= 16 = zero-pad path.Source§fn encode(&self, out: &mut Vec<u8>) -> Result<(), EncodeError>
fn encode(&self, out: &mut Vec<u8>) -> Result<(), EncodeError>
self into the XCDR2 payload sent as the
serialized_payload of a DATA submessage. Default endianness:
little-endian (RTPS 2.5 §10.5
RepresentationIdentifier = CDR2_LE = 0x0010). Read moreSource§fn decode(bytes: &[u8]) -> Result<Self, DecodeError>
fn decode(bytes: &[u8]) -> Result<Self, DecodeError>
bytes contains the full sample payload (encapsulation header already
stripped). Read moreSource§fn encode_key_holder_be(&self, holder: &mut PlainCdr2BeKeyHolder)
fn encode_key_holder_be(&self, holder: &mut PlainCdr2BeKeyHolder)
@key member values in PLAIN_CDR2-BE format
into the given PlainCdr2BeKeyHolder. Order: ascending by
member_id (XTypes 1.3 §7.6.8.3.1.b). Read moreSource§const EXTENSIBILITY: Extensibility = Extensibility::Final
const EXTENSIBILITY: Extensibility = Extensibility::Final
Final
for backwards compat with pre-EXTENSIBILITY codegen outputs.
Spec: zerodds-xcdr2-rust §2.3.Source§const IS_NESTED: bool = false
const IS_NESTED: bool = false
true if the type is annotated with @nested (XTypes 1.3
§7.4.6.3.5). Nested types are only intended as members of other
types and MUST NOT be registered as a DDS topic type.
DomainParticipant::create_topic rejects registration of
nested types with PreconditionNotMet.Source§const TYPE_IDENTIFIER: TypeIdentifier = zerodds_types::TypeIdentifier::None
const TYPE_IDENTIFIER: TypeIdentifier = zerodds_types::TypeIdentifier::None
TypeIdentifier::None signals “type-id not provided;
reader-writer matching falls back to plain type_name
comparison (DDS 1.4 §2.2.3 default path)”. Read moreSource§fn encode_be(&self, out: &mut Vec<u8>) -> Result<(), EncodeError>
fn encode_be(&self, out: &mut Vec<u8>) -> Result<(), EncodeError>
Self::encode. The default
implementation delegates to Self::encode (no byte swap),
since a generic BE re-encode is not possible without type
reflection. Codegen overrides this for structures that should
genuinely go on the wire as BE. Spec: zerodds-xcdr2-rust §2.4. Read moreSource§fn decode_be(bytes: &[u8]) -> Result<Self, DecodeError>
fn decode_be(bytes: &[u8]) -> Result<Self, DecodeError>
Self::decode — for a payload whose
encapsulation header declared a big-endian representation identifier
(CDR_BE = 0x0000, PL_CDR_BE = 0x0002, CDR2_BE = 0x0006,
D_CDR2_BE = 0x0008, PL_CDR2_BE = 0x000a). The default implementation
delegates to Self::decode (little-endian) so pre-decode_be codegen
keeps working on the canonical wire; idl-rust codegen overrides this to
build a big-endian reader. Symmetric to Self::encode_be. Spec:
zerodds-xcdr2-rust §2.4; RTPS 2.5 §10.5. Read moreSource§fn encode_xcdr1(&self, out: &mut Vec<u8>) -> Result<(), EncodeError>
fn encode_xcdr1(&self, out: &mut Vec<u8>) -> Result<(), EncodeError>
CDR_LE = 0x0001, max-alignment 8, no DHEADER on @final/@appendable,
PL_CDR1 for @mutable). This is the encoding Cyclone DDS carries in an
iceoryx PSMX chunk for a serialized sample, so the iceoryx-cyclone
bridge uses it for cross-vendor same-host interop. The default delegates
to Self::encode (XCDR2) — correct only for types whose XCDR1 and
XCDR2 byte streams coincide (no 8-byte members, @final, no @mutable);
idl-rust codegen overrides it with a true XCDR1 writer. Read moreSource§fn decode_xcdr1(bytes: &[u8]) -> Result<Self, DecodeError>
fn decode_xcdr1(bytes: &[u8]) -> Result<Self, DecodeError>
Self::encode_xcdr1; the default delegates to Self::decode and
idl-rust codegen overrides it with an XCDR1 reader. Read moreSource§fn decode_xcdr1_be(bytes: &[u8]) -> Result<Self, DecodeError>
fn decode_xcdr1_be(bytes: &[u8]) -> Result<Self, DecodeError>
CDR_BE = 0x0000 / PL_CDR_BE = 0x0002). The default delegates to
Self::decode_xcdr1 (little-endian) — correct for byte-order-agnostic
types and the common case (Cyclone/FastDDS/RTI emit XCDR1 little-endian);
idl-rust codegen overrides it with a true big-endian XCDR1 reader.
Symmetric to Self::decode_be for XCDR2. Read moreSource§fn field_value(&self, _path: &str) -> Option<Value>
fn field_value(&self, _path: &str) -> Option<Value>
"a.b") as a
zerodds_sql_filter::Value for SQL filter evaluation in
QueryCondition / ContentFilteredTopic. Default: None (no field
reachable — the filter then denies every sample that contains a
field access). Read more