pub struct Sender(/* private fields */);Expand description
The capability to publish one endpoint’s outbound flow.
Implementations§
Source§impl Sender
impl Sender
pub fn id(&self) -> ExchangeId
pub fn flow(&self) -> Flow
Sourcepub fn chunk_geometry(&self) -> ChunkGeometry
pub fn chunk_geometry(&self) -> ChunkGeometry
Physical geometry of this sender’s actual directional payload arena.
Sourcepub fn plan_chunks(&self, data_bytes: usize) -> Result<ChunkPlan>
pub fn plan_chunks(&self, data_bytes: usize) -> Result<ChunkPlan>
Plan a known payload for this direction’s actual arena geometry.
Sourcepub fn plan_chunks_with(
&self,
data_bytes: usize,
slots_per_chunk: usize,
) -> Result<ChunkPlan>
pub fn plan_chunks_with( &self, data_bytes: usize, slots_per_chunk: usize, ) -> Result<ChunkPlan>
Plan this direction with a runtime-selected slot count.
pub fn start(&mut self, metadata: Option<&[u8]>) -> Result<()>
Sourcepub fn reserve_start(&mut self, payload_len: usize) -> Result<PendingStart<'_>>
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.
pub fn data(&mut self, payload: &[u8]) -> Result<ChunkDescriptor>
Sourcepub fn reserve_data(&mut self, payload_len: usize) -> Result<PendingData<'_>>
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.
pub fn finish(&mut self) -> Result<()>
pub fn reset(&mut self, code: ResetCode) -> Result<()>
pub fn wait_writable(&self) -> Result<()>
pub fn poll_writable(&self, cx: &mut Context<'_>) -> Poll<Result<()>>
Sourcepub fn wait_ready(&self, payload_len: usize) -> Result<()>
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.
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more