use crate::Result;
use core::ffi::CStr;
mod binary;
#[cfg(feature = "fs")]
mod file;
pub use binary::ElfBinary;
#[cfg(feature = "fs")]
pub use file::ElfFile;
pub trait ElfObject {
fn file_name(&self) -> &CStr;
fn read(&mut self, buf: &mut [u8], offset: usize) -> Result<()>;
fn as_fd(&self) -> Option<i32>;
}
pub trait ElfObjectAsync: ElfObject {
fn read_async(
&mut self,
buf: &mut [u8],
offset: usize,
) -> impl core::future::Future<Output = Result<()>> + Send;
}