Skip to main content

Exchanges

Struct Exchanges 

Source
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

Source

pub fn open( fleet: Arc<Fleet>, incarnation: Incarnation, spec: ExchangeSpec, ) -> Result<Self>

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn offer(&self, ticket: ExchangeTicket, to: NodeId) -> Result<()>

Source

pub fn take_offer(&self) -> Option<ExchangeTicket>

Source

pub fn blocking_take_offer(&self) -> Result<ExchangeTicket>

Park until an exchange is offered to this node.

Source

pub fn take_offer_timeout( &self, timeout: Duration, ) -> Result<Option<ExchangeTicket>>

Wait at most timeout for an offered exchange.

Source

pub fn poll_take_offer( &self, cx: &mut Context<'_>, ) -> Poll<Result<ExchangeTicket>>

Task readiness for the next offered exchange.

Source

pub fn control(&self) -> &Streams

Source

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.

Source

pub fn reset_all(&self)

Quiescent-owner maintenance only. Attaching a replacement process never resets an exchange table or either payload arena implicitly.

Remove the control and payload SHM names. Existing mappings remain valid.

Trait Implementations§

Source§

impl Clone for Exchanges

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.