Struct gimli::read::AbbreviationsCache
source · pub struct AbbreviationsCache { /* private fields */ }
Expand description
A cache of previously parsed Abbreviations
.
Implementations§
source§impl AbbreviationsCache
impl AbbreviationsCache
sourcepub fn populate<R: Reader>(
&mut self,
strategy: AbbreviationsCacheStrategy,
debug_abbrev: &DebugAbbrev<R>,
units: DebugInfoUnitHeadersIter<R>,
)
pub fn populate<R: Reader>( &mut self, strategy: AbbreviationsCacheStrategy, debug_abbrev: &DebugAbbrev<R>, units: DebugInfoUnitHeadersIter<R>, )
Parse abbreviations and store them in the cache.
This will iterate over the given units to determine the abbreviations offsets. Any existing cache entries are discarded.
Errors during parsing abbreviations are also stored in the cache. Errors during iterating over the units are ignored.
sourcepub fn set<R: Reader>(
&mut self,
offset: DebugAbbrevOffset<R::Offset>,
abbreviations: Arc<Abbreviations>,
)
pub fn set<R: Reader>( &mut self, offset: DebugAbbrevOffset<R::Offset>, abbreviations: Arc<Abbreviations>, )
Set an entry in the abbreviations cache.
This is only required if you want to manually populate the cache.
sourcepub fn get<R: Reader>(
&self,
debug_abbrev: &DebugAbbrev<R>,
offset: DebugAbbrevOffset<R::Offset>,
) -> Result<Arc<Abbreviations>>
pub fn get<R: Reader>( &self, debug_abbrev: &DebugAbbrev<R>, offset: DebugAbbrevOffset<R::Offset>, ) -> Result<Arc<Abbreviations>>
Parse the abbreviations at the given offset.
This uses the cache if possible, but does not update it.
Trait Implementations§
source§impl Debug for AbbreviationsCache
impl Debug for AbbreviationsCache
source§impl Default for AbbreviationsCache
impl Default for AbbreviationsCache
source§fn default() -> AbbreviationsCache
fn default() -> AbbreviationsCache
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AbbreviationsCache
impl RefUnwindSafe for AbbreviationsCache
impl Send for AbbreviationsCache
impl Sync for AbbreviationsCache
impl Unpin for AbbreviationsCache
impl UnwindSafe for AbbreviationsCache
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