Skip to main content

Sender

Struct Sender 

Source
pub struct Sender(/* private fields */);
Expand description

The capability to publish one endpoint’s outbound flow.

Implementations§

Source§

impl Sender

Source

pub fn id(&self) -> ExchangeId

Source

pub fn flow(&self) -> Flow

Source

pub fn chunk_geometry(&self) -> ChunkGeometry

Physical geometry of this sender’s actual directional payload arena.

Source

pub fn plan_chunks(&self, data_bytes: usize) -> Result<ChunkPlan>

Plan a known payload for this direction’s actual arena geometry.

Source

pub fn plan_chunks_with( &self, data_bytes: usize, slots_per_chunk: usize, ) -> Result<ChunkPlan>

Plan this direction with a runtime-selected slot count.

Source

pub fn start(&mut self, metadata: Option<&[u8]>) -> Result<()>

Source

pub fn reserve_start(&mut self, payload_len: usize) -> Result<PendingStart<'_>>

Reserve start metadata directly in the shared payload arena. No start event is visible until the returned guard is committed.

Source

pub fn data(&mut self, payload: &[u8]) -> Result<ChunkDescriptor>

Source

pub fn reserve_data(&mut self, payload_len: usize) -> Result<PendingData<'_>>

Reserve one variable-sized data chunk directly in the payload arena. One commit emits one data descriptor.

Source

pub fn finish(&mut self) -> Result<()>

Source

pub fn reset(&mut self, code: ResetCode) -> Result<()>

Source

pub fn wait_writable(&self) -> Result<()>

Source

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

Source

pub fn wait_ready(&self, payload_len: usize) -> Result<()>

Wait for both one control frame and the payload credit needed by the next publication. Use zero for FIN, RESET, or a start without metadata.

Source

pub fn poll_ready( &self, payload_len: usize, cx: &mut Context<'_>, ) -> Poll<Result<()>>

Task readiness for the same combined control and payload capacity. Both sources register before Pending is returned.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Sender

§

impl !UnwindSafe for Sender

§

impl Forget for Sender

§

impl Freeze for Sender

§

impl Send for Sender

§

impl Sync for Sender

§

impl Unpin for Sender

§

impl UnsafeUnpin for Sender

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 = !

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.