pub struct Tx<W> { /* private fields */ }Expand description
Write half. queue buffers; only flush reaches the wire, so one flush can
carry an arbitrary number of requests.
Implementations§
Source§impl<W: AsyncWrite + Unpin> Tx<W>
impl<W: AsyncWrite + Unpin> Tx<W>
pub fn alloc_id(&mut self) -> u32
Sourcepub async fn queue(&mut self, kind: Verb, payload: &[u8]) -> Result<()>
pub async fn queue(&mut self, kind: Verb, payload: &[u8]) -> Result<()>
Send one request.
A Verb, not a byte. write_frame below still takes a byte because a reply is a byte
and the test server writes replies – but nothing outside this module reaches it to
send a request, and Verb has six values. See wire::Verb.
pub async fn flush(&mut self) -> Result<()>
Auto Trait Implementations§
impl<W> Freeze for Tx<W>where
W: Freeze,
impl<W> RefUnwindSafe for Tx<W>where
W: RefUnwindSafe,
impl<W> Send for Tx<W>where
W: Send,
impl<W> Sync for Tx<W>where
W: Sync,
impl<W> Unpin for Tx<W>where
W: Unpin,
impl<W> UnsafeUnpin for Tx<W>where
W: UnsafeUnpin,
impl<W> UnwindSafe for Tx<W>where
W: UnwindSafe,
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