pub struct Exchanges { /* private fields */ }Expand description
One fleet’s exchange transport: one duplex control table and either one shared payload arena or one independently bounded arena per direction.
Implementations§
Source§impl Exchanges
impl Exchanges
pub fn open( fleet: Arc<Fleet>, incarnation: Incarnation, spec: ExchangeSpec, ) -> Result<Self>
Sourcepub fn create(&self) -> Result<(ExchangeEndpoint, ExchangeTicket)>
pub fn create(&self) -> Result<(ExchangeEndpoint, ExchangeTicket)>
Create side A. Its sender writes A-to-B and its receiver reads B-to-A. The ticket opens side B.
Sourcepub fn create_payload_available(&self, payload_len: usize) -> Result<bool>
pub fn create_payload_available(&self, payload_len: usize) -> Result<bool>
Whether side A can currently reserve its first flow payload. Session transports use this before reserving a remote resource so payload backpressure does not become an abandoned resource lease.
Sourcepub fn poll_create_payload_available(
&self,
payload_len: usize,
cx: &mut Context<'_>,
) -> Poll<Result<()>>
pub fn poll_create_payload_available( &self, payload_len: usize, cx: &mut Context<'_>, ) -> Poll<Result<()>>
Task readiness for side A’s first flow payload credit.
Sourcepub fn open_peer(&self, ticket: ExchangeTicket) -> Result<ExchangeEndpoint>
pub fn open_peer(&self, ticket: ExchangeTicket) -> Result<ExchangeEndpoint>
Open side B. Its sender writes B-to-A and its receiver reads A-to-B. Both directions have independent lifecycle and may start in either order.
pub fn offer(&self, ticket: ExchangeTicket, to: NodeId) -> Result<()>
pub fn take_offer(&self) -> Option<ExchangeTicket>
Sourcepub fn blocking_take_offer(&self) -> Result<ExchangeTicket>
pub fn blocking_take_offer(&self) -> Result<ExchangeTicket>
Park until an exchange is offered to this node.
Sourcepub fn take_offer_timeout(
&self,
timeout: Duration,
) -> Result<Option<ExchangeTicket>>
pub fn take_offer_timeout( &self, timeout: Duration, ) -> Result<Option<ExchangeTicket>>
Wait at most timeout for an offered exchange.
Sourcepub fn poll_take_offer(
&self,
cx: &mut Context<'_>,
) -> Poll<Result<ExchangeTicket>>
pub fn poll_take_offer( &self, cx: &mut Context<'_>, ) -> Poll<Result<ExchangeTicket>>
Task readiness for the next offered exchange.
pub fn control(&self) -> &Streams
Sourcepub fn node_dead(&self, node: NodeId, incarnation: Incarnation)
pub fn node_dead(&self, node: NodeId, incarnation: Incarnation)
Apply a confirmed process-death report to control ownership and every payload arena. This is never inferred from a replacement attaching.