pub struct FrameTx { /* private fields */ }Expand description
Encoded-frame transmit handle handed to stream workers. The session loop owns the matching receiver and drains it into the socket’s write half — so multiple concurrent workers can interleave their output without contending on a writer mutex (AC #2 — interleaved chunks for two streams on one connection).
Implementations§
Source§impl FrameTx
impl FrameTx
pub fn new(tx: Sender<Bytes>, runtime: Arc<RedDBRuntime>) -> Self
Sourcepub async fn send_frame(&self, frame: Frame) -> Result<()>
pub async fn send_frame(&self, frame: Frame) -> Result<()>
Reserve both the payload and the encoded allocation before copying. Exhaustion fails this connection; never deliver a truncated success or let a stream worker silently discard a frame and continue with StreamEnd.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for FrameTx
impl !UnwindSafe for FrameTx
impl Forget for FrameTx
impl Freeze for FrameTxwhere
*const ArcInner<Chan<Bytes, Semaphore>> is !null: Freeze,
PhantomData<ArcInner<Chan<Bytes, Semaphore>>>: Freeze,
*const ArcInner<RedDBRuntime> is !null: Freeze,
PhantomData<ArcInner<RedDBRuntime>>: Freeze,
*const ArcInner<Shared<bool>> is !null: Freeze,
PhantomData<ArcInner<Shared<bool>>>: Freeze,
impl Move for FrameTx
impl Send for FrameTx
impl Sync for FrameTx
impl Unpin for FrameTx
impl UnsafeUnpin for FrameTxwhere
*const ArcInner<Chan<Bytes, Semaphore>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Chan<Bytes, Semaphore>>>: UnsafeUnpin,
*const ArcInner<RedDBRuntime> is !null: UnsafeUnpin,
PhantomData<ArcInner<RedDBRuntime>>: UnsafeUnpin,
*const ArcInner<Shared<bool>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Shared<bool>>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request