File: mod.rs

package info (click to toggle)
rust-async-compression 0.4.27-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,020 kB
  • sloc: makefile: 2
file content (23 lines) | stat: -rw-r--r-- 550 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
mod copy_buf;
mod interleave_pending;
mod limited;

pub use copy_buf::copy_buf;

pub trait AsyncWriteTestExt: tokio::io::AsyncWrite {
    fn interleave_pending_write(self) -> interleave_pending::InterleavePending<Self>
    where
        Self: Sized + Unpin,
    {
        interleave_pending::InterleavePending::new(self)
    }

    fn limited_write(self, limit: usize) -> limited::Limited<Self>
    where
        Self: Sized + Unpin,
    {
        limited::Limited::new(self, limit)
    }
}

impl<T: tokio::io::AsyncWrite> AsyncWriteTestExt for T {}