Skip to main content

load

Function load 

Source
pub fn load(bytes: &[u8]) -> Result<Box<dyn BinaryFormat>, LoadError>
Expand description

Detect the container format of bytes and parse it.

This is the entry point for callers that do not care which container they were handed: the result answers every BinaryFormat query. Match on Format::detect and call elf::ElfBinary::parse, pe::PeBinary::parse or le::LeBinary::parse directly to keep the concrete type.