pub struct TopicInfo<'a> {
pub name: &'a str,
pub type_name: &'a str,
pub type_hash: &'a str,
pub domain_id: u32,
pub node_name: Option<&'a str>,
pub namespace: &'a str,
pub rx_buffer_hint: usize,
}Expand description
Topic information for pub/sub
Fields§
§name: &'a strTopic name (e.g., “/chatter”)
type_name: &'a strROS type name (e.g., “std_msgs::msg::dds_::String_”)
type_hash: &'a strType hash for compatibility checking
domain_id: u32Domain ID (default: 0)
node_name: Option<&'a str>Node name for liveliness token generation.
None means no node association — no liveliness token will be declared.
namespace: &'a strNode namespace for liveliness token generation (default: “/”). In ROS 2, “/” is the root namespace and the standard default.
rx_buffer_hint: usizePhase 231 (RFC-0038) — receive-buffer size hint, bytes. The executor sets
this from the subscription’s RX_BUF; a backend may use it to route the
subscription to a size-class receive buffer (zenoh-pico: small vs large).
0 = unset (backend picks its default). Ignored by backends that don’t
size-class their receive storage.
Implementations§
Source§impl<'a> TopicInfo<'a>
impl<'a> TopicInfo<'a>
Sourcepub const fn new(
name: &'a str,
type_name: &'a str,
type_hash: &'a str,
) -> TopicInfo<'a>
pub const fn new( name: &'a str, type_name: &'a str, type_hash: &'a str, ) -> TopicInfo<'a>
Create new topic info
Sourcepub const fn with_domain(self, domain_id: u32) -> TopicInfo<'a>
pub const fn with_domain(self, domain_id: u32) -> TopicInfo<'a>
Create topic info with custom domain ID
Sourcepub const fn with_rx_buffer_hint(self, hint: usize) -> TopicInfo<'a>
pub const fn with_rx_buffer_hint(self, hint: usize) -> TopicInfo<'a>
Phase 231 (RFC-0038) — set the receive-buffer size hint (bytes) used by size-classing backends (zenoh-pico) to route the subscription’s receive buffer to the small or large class.
Sourcepub const fn with_node_name(self, node_name: &'a str) -> TopicInfo<'a>
pub const fn with_node_name(self, node_name: &'a str) -> TopicInfo<'a>
Set the node name for liveliness token generation
Sourcepub const fn with_namespace(self, namespace: &'a str) -> TopicInfo<'a>
pub const fn with_namespace(self, namespace: &'a str) -> TopicInfo<'a>
Set the node namespace for liveliness token generation