Skip to main content

Transmitter

Struct Transmitter 

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

One peer’s preallocated local ledger, correlated probes, and bounded repair.

The actor and simulator share this policy. Neither timer expiry nor an unsolicited partial receipt schedules a retransmission. Only a valid response to a live probe can identify an outstanding range for repair. Payload ownership, authenticated binding, role checks, journal generations, and quorum stay outside.

Implementations§

Source§

impl Transmitter

Source

pub fn new( scope: Scope, limits: PipelineLimits, first: RequestId, timing: ProbeTiming, now: Duration, ) -> Result<Self, TransmitError>

Reserve this sender’s local metadata window and start fresh probe correlation. Remote receipt reports cannot increase this allocation.

Source

pub fn enable_broadcast(&mut self)

Enable loss-tolerant PUB delivery. PEER reservations cover repair only. Receivers report PUB receipt unasked, so new work waits for the probe delay.

Source

pub fn needs_catch_up(&self) -> bool

A correlated probe found missing publications beyond existing reservations. Fresh PEER sends are allowed only while the frozen target remains unsent.

Source

pub const fn catch_up_through(&self) -> Option<OpNumber>

Frozen upper bound for fresh PEER catch-up in broadcast mode.

Source

pub fn sender(&self) -> Option<&Sender>

Active peer ledger, or none until exact history verifies a correlated open.

Source

pub const fn candidate(&self) -> Option<OpenRequest>

Pending history check, for matching asynchronous callbacks before adoption.

Source

pub const fn pending_probe(&self) -> Option<Probe>

Current immutable exchange, for adapter correlation and diagnostics.

Source

pub fn replace_session(&mut self, now: Duration) -> Result<(), TransmitError>

Fence link-session correlation without granting fresh receive capacity. Retain the channel ledger, outstanding sends, and any established repair. A new probe verifies peer state; an old asynchronous history lookup cannot install its retired candidate after the session changes.

Source

pub fn change_scope( &mut self, scope: Scope, now: Duration, ) -> Result<(), TransmitError>

Fence a changed normal scope while retaining all startup allocations and IDs. Reconnection alone does not call this method or reset local accounting.

Source

pub fn next_probe(&self) -> Option<Duration>

When poll_probe next sends or retries on time alone. None while a repair runs, which probes never overtake.

Source

pub fn poll_probe( &mut self, available: Prefix, transport_pending: bool, now: Duration, ) -> Result<Option<Probe>, TransmitError>

Poll small status traffic independently of durable ACK or election timers.

transport_pending includes this peer’s locally retained data transmissions. Do not let a probe overtake that queue and mistake unsent bytes for a gap. Poll while durability/receipt remains unresolved, including received but not durably acknowledged bytes: a receiver can reset after volatile receipt.

Source

pub fn record_send(&mut self, operations: &[Operation]) -> Result<(), FlowError>

Reserve a fresh suffix once after ensuring the adapter can retain its packet. Known repair takes precedence over sending more data beyond that gap.

Source

pub fn observe( &mut self, report: Report, request_id: Option<RequestId>, now: Duration, ) -> Result<StatusOutcome, TransmitError>

Observe authenticated status. Unknown epochs need correlation plus history. Same-epoch unsolicited receipts may retire reservations but never request repair.

Source

pub fn observe_with_repair_limit( &mut self, report: Report, request_id: Option<RequestId>, repair_limit: Option<OpNumber>, now: Duration, ) -> Result<StatusOutcome, TransmitError>

A correlated response may stop repair before data already held on SUB. The bound grants no capacity or history authority and cannot exceed the probe.

Source

pub fn open_verified( &mut self, request: OpenRequest, base: Prefix, received: Prefix, now: Duration, ) -> Result<bool, TransmitError>

Adopt only the still-current candidate after exact local-history verification.

Prefix arguments must come from current-generation local history, not copied report fields. Stale callbacks return false. Old pending payloads must be fenced by their epochs; they cannot become reservations in the new channel.

Source

pub fn repair(&self, transport_pending: bool) -> Option<Repair>

Current bounded retry range, suppressed while this peer has queued data.

Source

pub fn record_repair( &mut self, repair: Repair, through: Prefix, ) -> Result<(), FlowError>

Record one retained retry chunk without charging unique-send metadata again. through must name an exact reserved operation inside the current repair.

Trait Implementations§

Source§

impl Debug for Transmitter

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.