pub struct ObjReader<R> { /* private fields */ }Expand description
COFF 对象文件 (.obj) 结构,惰性读取器
Implementations§
Source§impl<W: Read + Seek> ObjReader<W>
impl<W: Read + Seek> ObjReader<W>
Sourcepub fn read_object(self) -> GaiaDiagnostics<CoffObject>
pub fn read_object(self) -> GaiaDiagnostics<CoffObject>
读取完整的 COFF 对象(惰性读取,会缓存结果)
Trait Implementations§
Source§impl<W: Read + Seek> CoffReader<W> for ObjReader<W>
impl<W: Read + Seek> CoffReader<W> for ObjReader<W>
Source§fn get_viewer(&mut self) -> &mut BinaryReader<W, LittleEndian>
fn get_viewer(&mut self) -> &mut BinaryReader<W, LittleEndian>
获取二进制读取器的可变引用
Source§fn add_diagnostics(&mut self, error: impl Into<GaiaError>)
fn add_diagnostics(&mut self, error: impl Into<GaiaError>)
获取诊断信息的可变引用
Source§fn get_cached_section_headers(&self) -> Option<&Vec<SectionHeader>>
fn get_cached_section_headers(&self) -> Option<&Vec<SectionHeader>>
获取缓存的节头信息
Source§fn set_cached_section_headers(&mut self, headers: Vec<SectionHeader>)
fn set_cached_section_headers(&mut self, headers: Vec<SectionHeader>)
设置缓存的节头信息
Source§fn read_header_once(&mut self) -> Result<&CoffHeader, GaiaError>
fn read_header_once(&mut self) -> Result<&CoffHeader, GaiaError>
读取 COFF 头部信息(通用实现)
Source§fn read_object_once(&mut self) -> Result<&CoffObject, GaiaError>
fn read_object_once(&mut self) -> Result<&CoffObject, GaiaError>
强制读取完整的 COFF 对象,并缓存结果
Source§fn read_header_force(&mut self) -> Result<CoffHeader, GaiaError>
fn read_header_force(&mut self) -> Result<CoffHeader, GaiaError>
强制读取 COFF 头部(通用实现)
Source§fn read_section_headers(&mut self) -> Result<Vec<SectionHeader>, GaiaError>
fn read_section_headers(&mut self) -> Result<Vec<SectionHeader>, GaiaError>
读取节头信息(通用实现)
Source§fn read_section_from_header(
&mut self,
header: &SectionHeader,
) -> Result<CoffSection, GaiaError>
fn read_section_from_header( &mut self, header: &SectionHeader, ) -> Result<CoffSection, GaiaError>
从节头读取节数据(通用实现)
Source§fn read_symbols(&mut self) -> Result<Vec<CoffSymbol>, GaiaError>
fn read_symbols(&mut self) -> Result<Vec<CoffSymbol>, GaiaError>
读取符号表(通用实现)
Source§fn read_object_force(&mut self) -> Result<CoffObject, GaiaError>
fn read_object_force(&mut self) -> Result<CoffObject, GaiaError>
强制读取完整的 COFF 对象
Auto Trait Implementations§
impl<R> Freeze for ObjReader<R>where
R: Freeze,
impl<R> !RefUnwindSafe for ObjReader<R>
impl<R> Send for ObjReader<R>where
R: Send,
impl<R> Sync for ObjReader<R>where
R: Sync,
impl<R> Unpin for ObjReader<R>where
R: Unpin,
impl<R> !UnwindSafe for ObjReader<R>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more