pub struct CompileEntry {
pub file: PathBuf,
pub directory: Option<PathBuf>,
pub arguments: Vec<String>,
}Expand description
A single translation unit from the compilation database.
Fields§
§file: PathBufThe translation unit’s source path, resolved against its directory when the recorded path is relative.
directory: Option<PathBuf>The working directory the command was recorded in, if any.
arguments: Vec<String>The compiler invocation, one argument per element.
Empty for a database that recorded neither arguments nor command,
which is legal and means only that this unit’s build configuration is
unknown — not that it was compiled with nothing.
Implementations§
Source§impl CompileEntry
impl CompileEntry
Sourcepub fn build(&self) -> CppBuild
pub fn build(&self) -> CppBuild
The semantic build configuration this exact command describes.
Database-wide text does not participate: unrelated commands and generator reformatting must not change this translation unit’s build identity when its normalized compiler settings did not change.
Sourcepub fn selector_fields(&self) -> (String, Option<String>, Vec<String>)
pub fn selector_fields(&self) -> (String, Option<String>, Vec<String>)
The stable fields a helper uses to select this exact command.
Paths are normalized in the same way as the helper’s database reader, so a scan rooted through a symbolic link cannot accidentally turn one command into an unselectable sibling.
Trait Implementations§
Source§impl Clone for CompileEntry
impl Clone for CompileEntry
Source§fn clone(&self) -> CompileEntry
fn clone(&self) -> CompileEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CompileEntry
impl Debug for CompileEntry
impl Eq for CompileEntry
Source§impl PartialEq for CompileEntry
impl PartialEq for CompileEntry
impl StructuralPartialEq for CompileEntry
Auto Trait Implementations§
impl Freeze for CompileEntry
impl RefUnwindSafe for CompileEntry
impl Send for CompileEntry
impl Sync for CompileEntry
impl Unpin for CompileEntry
impl UnsafeUnpin for CompileEntry
impl UnwindSafe for CompileEntry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.