pub struct SymbolTable<'data, Xcoff, R = &'data [u8]>where
Xcoff: FileHeader,
R: ReadRef<'data>,{
symbols: &'data [SymbolBytes],
strings: StringTable<'data, R>,
header: PhantomData<Xcoff>,
}
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
.
Fields§
§symbols: &'data [SymbolBytes]
§strings: StringTable<'data, R>
§header: PhantomData<Xcoff>
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(super) fn iter_none<'table>(
&'table self,
) -> SymbolIterator<'data, 'table, Xcoff, R> ⓘ
pub(super) fn iter_none<'table>( &'table self, ) -> SymbolIterator<'data, 'table, Xcoff, R> ⓘ
Empty symbol iterator.
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.
sourcefn symbol_unchecked(&self, index: SymbolIndex) -> Result<&'data Xcoff::Symbol>
fn symbol_unchecked(&self, index: SymbolIndex) -> Result<&'data Xcoff::Symbol>
Get the symbol at the given index.
This does not check if the symbol is null, but does check if the index is in bounds.
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