Skip to main content

StatelessMessageWriter

Struct StatelessMessageWriter 

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

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

Maintains multi-reader fan-out for the BUILTIN_PARTICIPANT_STATELESS_MESSAGE_WRITER endpoint. Each write() produces one OutboundDatagram per registered ReaderProxy — no cache, no resend, no HEARTBEAT (stateless = no receive status).

Implementations§

Source§

impl StatelessMessageWriter

Source

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

Creates a writer for the local participant.

Source

pub fn guid(&self) -> Guid

GUID of the writer.

Source

pub fn reader_proxies(&self) -> &[ReaderProxy]

Read-only slice of the registered reader proxies.

Source

pub fn reader_proxy_count(&self) -> usize

Number of registered reader proxies.

Source

pub fn add_reader_proxy(&mut self, proxy: ReaderProxy)

Adds a reader proxy (idempotent: same GUID overwrites).

Source

pub fn remove_reader_proxy(&mut self, guid: Guid) -> Option<ReaderProxy>

Removes a reader proxy. Returns it if present.

Source

pub fn write( &mut self, msg: &ParticipantGenericMessage, ) -> Result<Vec<OutboundDatagram>, WireError>

Sends a ParticipantGenericMessage to all reader proxies.

Returns one datagram per proxy (or empty if none are registered).

§Errors

WireError::ValueOutOfRange on sequence-number overflow or WireError::* from the DATA encoding pipeline.

Trait Implementations§

Source§

impl Debug for StatelessMessageWriter

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.