#[non_exhaustive]pub struct Source {
pub path: PathBuf,
pub compile_group_index: Option<usize>,
pub source_group_index: Option<usize>,
pub is_generated: bool,
pub file_set_index: Option<usize>,
pub backtrace: Option<usize>,
}
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.path: PathBuf
Path to the source file on disk, represented with forward slashes. If the file is inside the top-level source directory then the path is specified relative to that directory. Otherwise the path is absolute.
compile_group_index: Option<usize>
Optional member that is present when the source is compiled. The value is an unsigned integer 0-based index into the compileGroups array.
source_group_index: Option<usize>
Optional member that is present when the source is part of a source group either via the source_group() command or by default. The value is an unsigned integer 0-based index into the sourceGroups array.
is_generated: bool
True if the source is GENERATED.
file_set_index: Option<usize>
Optional member that is present when the source is part of a file set. The value is an unsigned integer 0-based index into the fileSets array. This field was added in codemodel version 2.5.
backtrace: Option<usize>
Optional member that is present when a CMake language backtrace to the target_sources(), add_executable(), add_library(), add_custom_target(), or other command invocation that added this source to the target is available. The value is an unsigned integer 0-based index into the backtraceGraph member’s nodes array.