Struct srcsrv::SrcSrvStream [−][src]
pub struct SrcSrvStream<'a> { /* fields omitted */ }
Expand description
A parsed representation of the srcsrv
stream from a PDB file.
Implementations
Parse the srcsrv
stream. The stream bytes can be obtained with the help of
the PDB::named_stream
method from the pdb
crate.
use srcsrv::SrcSrvStream;
if let Ok(srcsrv_stream) = pdb.named_stream(b"srcsrv") {
let stream = SrcSrvStream::parse(srcsrv_stream.as_slice())?;
}
The value of the INDEXVERSION field from the ini section, if specified.
The value of the DATETIME field from the ini section, if specified.
The value of the VERCTRL field from the ini section, if specified.
pub fn source_for_path(
&self,
original_file_path: &str,
extraction_base_path: &str
) -> Result<Option<SourceRetrievalMethod>, EvalError>
pub fn source_for_path(
&self,
original_file_path: &str,
extraction_base_path: &str
) -> Result<Option<SourceRetrievalMethod>, EvalError>
Look up original_file_path
in the file entries and find out how to obtain
the source for this file. This evaluates the variables for the matching file
entry.
extraction_base_path
is used as the value of the special %targ%
variable
and should not include a trailing backslash.
Returns Ok(None)
if the file path was not found in the list of file entries.
use srcsrv::{SrcSrvStream, SourceRetrievalMethod};
println!(
"{:#?}",
stream.source_for_path(
r#"C:\build\renderdoc\renderdoc\data\glsl\gl_texsample.h"#,
r#"C:\Debugger\Cached Sources"#
)?
);
pub fn source_and_raw_var_values_for_path(
&self,
original_file_path: &str,
extraction_base_path: &str
) -> Result<Option<(SourceRetrievalMethod, EvalVarMap)>, EvalError>
pub fn source_and_raw_var_values_for_path(
&self,
original_file_path: &str,
extraction_base_path: &str
) -> Result<Option<(SourceRetrievalMethod, EvalVarMap)>, EvalError>
Look up original_file_path
in the file entries and find out how to obtain
the source for this file. This evaluates the variables for the matching file
entry.
extraction_base_path
is used as the value of the special %targ%
variable
and should not include a trailing backslash.
This method additionally returns the raw values of all variables. This gives
consumers more ways to special-case their behavior. It also acts as an escape
hatch if there are any cases that SourceRetrievalMethod
does not cover.
If you don’t need the raw variable values, prefer to call source_for_path
instead.
Returns Ok(None)
if the file path was not found in the list of file entries.
A set of strings which can be substring-matched to the output of the command that executed when obtaining source files.
If any of the strings matches, it is recommended to “persist the error”
and refuse to execute further commands for other files with the same
error_persistence_version_control
value.
Get the value of the specified field from the ini section. The field name is case-insensitive.
Get the raw, unevaluated value of the specified field from the variables section. The field name is case-insensitive.