FromIO

Trait FromIO 

Source
pub trait FromIO {
    // Required methods
    fn read_from(reader: &mut impl Read) -> Result<Self>
       where Self: Sized;
    fn write_to(&self, writer: &mut impl Write) -> Result<()>;
}
Expand description

Read Self from io::Read or write Self to io::Write.

Required Methods§

Source

fn read_from(reader: &mut impl Read) -> Result<Self>
where Self: Sized,

Read Self from io::Read.

Source

fn write_to(&self, writer: &mut impl Write) -> Result<()>

Write Self to io::Write.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§