IntoRead

Trait IntoRead 

Source
pub trait IntoRead {
    type Read: Read;

    // Required method
    fn into_read(self) -> Self::Read;
}
Expand description

Something that can be turned into a reader compatible with Encoder

This is automatically implemented for some standard types, like byte slices and vectors of bytes.

Required Associated Types§

Required Methods§

Source

fn into_read(self) -> Self::Read

Transforms self into a type implementing Read

Implementations on Foreign Types§

Source§

impl IntoRead for Vec<u8>

Available on crate feature alloc only.
Source§

impl<'a> IntoRead for &'a [u8]

Source§

type Read = Slice<'a>

Source§

fn into_read(self) -> Self::Read

Source§

impl<'a> IntoRead for &'a mut [u8]

Source§

type Read = Slice<'a>

Source§

fn into_read(self) -> Self::Read

Implementors§

Source§

impl<T: Read> IntoRead for T

Source§

type Read = T