Trait EntityIo

Source
pub trait EntityIo {
    // Required methods
    fn read<R: ElfRead>(
        reader: &mut R,
        class: Class,
        byte_order: ByteOrder,
    ) -> Result<Self, Error>
       where Self: Sized;
    fn write<W: ElfWrite>(
        &self,
        writer: &mut W,
        class: Class,
        byte_order: ByteOrder,
    ) -> Result<(), Error>;
}
Expand description

Read an entity from a file or write an entity to a file.

Usually an entity doesn’t occupy the whole section or segment.

Required Methods§

Source

fn read<R: ElfRead>( reader: &mut R, class: Class, byte_order: ByteOrder, ) -> Result<Self, Error>
where Self: Sized,

Read the entity from the reader.

Source

fn write<W: ElfWrite>( &self, writer: &mut W, class: Class, byte_order: ByteOrder, ) -> Result<(), Error>

Write the entity to the writer.

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§