[][src]Struct samotop_core::test_util::TestIO

pub struct TestIO {
    pub input: Vec<u8>,
    pub output: Vec<u8>,
    pub read: usize,
    pub read_chunks: VecDeque<usize>,
}

Fields

input: Vec<u8>output: Vec<u8>read: usizeread_chunks: VecDeque<usize>

Implementations

impl TestIO[src]

pub fn written(&self) -> &[u8]

Notable traits for &'_ mut [u8]

impl<'_> Write for &'_ mut [u8]impl<'_> Read for &'_ [u8]
[src]

pub fn read(&self) -> &[u8]

Notable traits for &'_ mut [u8]

impl<'_> Write for &'_ mut [u8]impl<'_> Read for &'_ [u8]
[src]

pub fn unread(&self) -> &[u8]

Notable traits for &'_ mut [u8]

impl<'_> Write for &'_ mut [u8]impl<'_> Read for &'_ [u8]
[src]

pub fn new() -> Self[src]

pub fn add_read_chunk(self, chunk: impl AsRef<[u8]>) -> Self[src]

Trait Implementations

impl AsyncRead for TestIO[src]

impl AsyncWrite for TestIO[src]

impl<T: AsRef<[u8]>> From<T> for TestIO[src]

impl MayBeTls for TestIO[src]

impl PinnedDrop for TestIO[src]

impl<'pin> Unpin for TestIO where
    __TestIO<'pin>: Unpin
[src]

impl UnsafeUnpin for TestIO[src]

Auto Trait Implementations

impl RefUnwindSafe for TestIO

impl Send for TestIO

impl Sync for TestIO

impl UnwindSafe for TestIO

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<R> AsyncReadExt for R where
    R: AsyncRead + ?Sized
[src]

impl<W> AsyncWriteExt for W where
    W: AsyncWrite + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, TLSIO> MayBeTls for T where
    T: DerefMut<Target = TLSIO> + Unpin,
    TLSIO: MayBeTls + Unpin
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.