Skip to main content

StatelessMessageReader

Struct StatelessMessageReader 

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

Stateless message reader (Spec §7.4.4 + §10.3.4).

Decodes incoming DATA submessages addressed to the BUILTIN_PARTICIPANT_STATELESS_MESSAGE_READER. Stateless: no history cache, no ACKNACK, no heartbeat state. A known writer proxy is optional for source-authenticity checks — the reader always delivers the message, the auth plugin hook decides based on the source_guid field.

Implementations§

Source§

impl StatelessMessageReader

Source

pub fn new(participant_prefix: GuidPrefix, vendor_id: VendorId) -> Self

Creates a reader for the local participant.

Source

pub fn guid(&self) -> Guid

GUID of the reader.

Source

pub fn writer_proxy_count(&self) -> usize

Number of registered writer proxies.

Source

pub fn writer_proxies(&self) -> &[WriterProxy]

Read-only slice of the registered writer proxies.

Source

pub fn add_writer_proxy(&mut self, proxy: WriterProxy)

Adds a writer proxy (idempotent).

Source

pub fn remove_writer_proxy(&mut self, guid: Guid) -> Option<WriterProxy>

Removes a writer proxy.

Source

pub fn handle_data( &mut self, data: &DataSubmessage, ) -> SecurityResult<ParticipantGenericMessage>

Processes an incoming DATA submessage and decodes it into a ParticipantGenericMessage.

§Errors

BadArgument if the encapsulation/CDR decode fails.

Source

pub fn handle_data_frag( &mut self, df: &DataFragSubmessage, ) -> SecurityResult<Vec<ParticipantGenericMessage>>

Processes an incoming DATA_FRAG submessage. Large stateless messages (HandshakeReply/Final with cert/permissions) are RTPS-fragmented cross-vendor. Returns the decoded ParticipantGenericMessage once all fragments are present (otherwise empty — best-effort, no NACK).

§Errors

BadArgument if the reassembled generic-message body does not parse.

Source

pub fn handle_datagram( &mut self, datagram: &[u8], ) -> SecurityResult<Vec<ParticipantGenericMessage>>

Processes a complete RTPS datagram. Returns all decoded stateless messages from this datagram.

§Errors
  • BadArgument if the datagram does not parse (wire decoder error) or a relevant DATA submessage has a corrupt generic-message body.

Trait Implementations§

Source§

impl Debug for StatelessMessageReader

Source§

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

Formats the value using the given formatter. Read more

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.