pub struct PortablePdb<'data> { /* private fields */ }Expand description
A parsed Portable PDB file.
This can be converted to a PortablePdbCache using the
PortablePdbCacheConverter::process_portable_pdb
method.
Implementations§
Source§impl<'data> PortablePdb<'data>
impl<'data> PortablePdb<'data>
Sourcepub fn peek(buf: &[u8]) -> bool
pub fn peek(buf: &[u8]) -> bool
Checks whether the provided buffer could potentially be a Portable PDB file, without fully parsing it.
Sourcepub fn parse(buf: &'data [u8]) -> Result<Self, FormatError>
pub fn parse(buf: &'data [u8]) -> Result<Self, FormatError>
Parses the provided buffer into a Portable PDB file.
Sourcepub fn has_debug_info(&self) -> bool
pub fn has_debug_info(&self) -> bool
Returns true if this portable pdb file contains method debug information.
Sourcepub fn get_document(&self, idx: usize) -> Result<Document, FormatError>
pub fn get_document(&self, idx: usize) -> Result<Document, FormatError>
Get source file referenced by this PDB.
Given index must be between 1 and get_documents_count().
Sourcepub fn get_documents_count(&self) -> Result<usize, FormatError>
pub fn get_documents_count(&self) -> Result<usize, FormatError>
Get the number of source files referenced by this PDB.
Sourcepub fn get_embedded_sources(
&self,
) -> Result<EmbeddedSourceIterator<'_, 'data>, FormatError>
pub fn get_embedded_sources( &self, ) -> Result<EmbeddedSourceIterator<'_, 'data>, FormatError>
An iterator over source files contents’ embedded in this PDB.
Sourcepub fn has_source_links(&self) -> Result<bool, FormatError>
pub fn has_source_links(&self) -> Result<bool, FormatError>
Whether this PPDB contains source-link mappings.
Sourcepub fn get_source_link(&self, document: &Document) -> Option<Cow<'_, str>>
pub fn get_source_link(&self, document: &Document) -> Option<Cow<'_, str>>
Tries to resolve given document as a source link (URL). Make sure to try Self::get_embedded_sources first when looking for a source file, because function may return a link that actually doesn’t exist (e.g. file is in .gitignore). In that case, it’s usually the case that the file is embedded in the PPDB instead.
Trait Implementations§
Source§impl<'data> Clone for PortablePdb<'data>
impl<'data> Clone for PortablePdb<'data>
Source§fn clone(&self) -> PortablePdb<'data>
fn clone(&self) -> PortablePdb<'data>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more