pub struct FrameSink { /* private fields */ }Expand description
Cheaply cloneable handle to one connection’s bounded outbound frame queue.
Backends emit responses, streaming frames, and future PUSH frames through this
single path. The queue is bounded twice: by queued BYTES (the budget that
matters for memory and for how long a slow reader may pause), and by the
mpsc channel’s frame count (a backstop). The socket layer owns the sole
receiver/writer.
Implementations§
Source§impl FrameSink
impl FrameSink
Sourcepub fn new(tx: Sender<OutboundFrame>) -> Self
pub fn new(tx: Sender<OutboundFrame>) -> Self
A sink with the standard per-connection byte budget
(crate::server::CONNECTION_EGRESS_BYTE_BUDGET); the frame-count bound
is whatever capacity tx’s channel was created with.
pub async fn send(&self, frame: Frame) -> Result<(), RouterError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FrameSink
impl RefUnwindSafe for FrameSink
impl Send for FrameSink
impl Sync for FrameSink
impl Unpin for FrameSink
impl UnsafeUnpin for FrameSink
impl UnwindSafe for FrameSink
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