pub struct EndpointOutcome<P: Protocol> {
pub txs: Vec<(Vec<u8>, SocketAddr)>,
pub events: Vec<ServerEvent<P>>,
pub header_retransmit: Option<Vec<u8>>,
}Expand description
Outbound result from a single ProtocolEndpoint::handle_inbound call.
Carries the outbound datagrams the core wants to send plus the
server events the core emitted. The run loop consumes this to drive
the real UdpSocket and to update the fan-out engine’s cache.
Fields§
§txs: Vec<(Vec<u8>, SocketAddr)>Outbound datagrams — each (bytes, destination).
events: Vec<ServerEvent<P>>Consumer-visible server events.
header_retransmit: Option<Vec<u8>>Cached voice-header bytes to rebroadcast to the rest of the module on this tick.
Populated by the stream cache every 21 voice frames to match
the xlxd / MMDVMHost cadence — the run loop fans these
bytes out to every non-originator peer on the module in
addition to the normal voice frame that triggered the cadence.
Empty on the vast majority of ticks.
Implementations§
Source§impl<P: Protocol> EndpointOutcome<P>
impl<P: Protocol> EndpointOutcome<P>
Sourcepub const fn empty() -> Self
pub const fn empty() -> Self
Construct an empty outcome (no txs, no events, no retransmit).
We cannot derive Default because it would require
P: Default, which the sealed Protocol trait intentionally
doesn’t bound. Every protocol marker is a ZST so constructing
an empty outcome has no data-dependent initialization anyway.
Trait Implementations§
Source§impl<P: Clone + Protocol> Clone for EndpointOutcome<P>
impl<P: Clone + Protocol> Clone for EndpointOutcome<P>
Source§fn clone(&self) -> EndpointOutcome<P>
fn clone(&self) -> EndpointOutcome<P>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more