Struct object::read::xcoff::SymbolTable
source · pub struct SymbolTable<'data, Xcoff, R = &'data [u8]>where
Xcoff: FileHeader,
R: ReadRef<'data>,{ /* private fields */ }
Expand description
A table of symbol entries in an XCOFF file.
Also includes the string table used for the symbol names.
Returned by FileHeader::symbols
.
Implementations§
source§impl<'data, Xcoff, R> SymbolTable<'data, Xcoff, R>where
Xcoff: FileHeader,
R: ReadRef<'data>,
impl<'data, Xcoff, R> SymbolTable<'data, Xcoff, R>where
Xcoff: FileHeader,
R: ReadRef<'data>,
sourcepub fn strings(&self) -> StringTable<'data, R>
pub fn strings(&self) -> StringTable<'data, R>
Return the string table used for the symbol names.
sourcepub fn iter<'table>(&'table self) -> SymbolIterator<'data, 'table, Xcoff, R> ⓘ
pub fn iter<'table>(&'table self) -> SymbolIterator<'data, 'table, Xcoff, R> ⓘ
Iterate over the symbols.
This does not return null symbols.
sourcepub fn get<T: Pod>(&self, index: SymbolIndex, offset: usize) -> Result<&'data T>
pub fn get<T: Pod>(&self, index: SymbolIndex, offset: usize) -> Result<&'data T>
Return the symbol entry at the given index and offset.
sourcepub fn symbol(&self, index: SymbolIndex) -> Result<&'data Xcoff::Symbol>
pub fn symbol(&self, index: SymbolIndex) -> Result<&'data Xcoff::Symbol>
Get the symbol at the given index.
Returns an error for null symbols and out of bounds indices. Note that this is unable to check whether the index is an auxiliary symbol.
sourcepub fn aux_file(
&self,
index: SymbolIndex,
offset: usize,
) -> Result<&'data Xcoff::FileAux>
pub fn aux_file( &self, index: SymbolIndex, offset: usize, ) -> Result<&'data Xcoff::FileAux>
Return a file auxiliary symbol.
Trait Implementations§
source§impl<'data, Xcoff, R> Debug for SymbolTable<'data, Xcoff, R>
impl<'data, Xcoff, R> Debug for SymbolTable<'data, Xcoff, R>
source§impl<'data, Xcoff, R> Default for SymbolTable<'data, Xcoff, R>where
Xcoff: FileHeader,
R: ReadRef<'data>,
impl<'data, Xcoff, R> Default for SymbolTable<'data, Xcoff, R>where
Xcoff: FileHeader,
R: ReadRef<'data>,
Auto Trait Implementations§
impl<'data, Xcoff, R> Freeze for SymbolTable<'data, Xcoff, R>where
R: Freeze,
impl<'data, Xcoff, R> RefUnwindSafe for SymbolTable<'data, Xcoff, R>where
Xcoff: RefUnwindSafe,
R: RefUnwindSafe,
impl<'data, Xcoff, R> Send for SymbolTable<'data, Xcoff, R>
impl<'data, Xcoff, R> Sync for SymbolTable<'data, Xcoff, R>
impl<'data, Xcoff, R> Unpin for SymbolTable<'data, Xcoff, R>
impl<'data, Xcoff, R> UnwindSafe for SymbolTable<'data, Xcoff, R>where
Xcoff: UnwindSafe,
R: UnwindSafe,
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