#[non_exhaustive]
pub struct DirectoryReference { pub source: PathBuf, pub build: PathBuf, pub parent_index: Option<usize>, pub child_indexes: Vec<usize>, pub project_index: usize, pub target_indexes: Vec<usize>, pub minimum_cmake_version: Option<MinimumCmakeVersion>, pub has_install_rule: bool, pub json_file: PathBuf, }

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§source: PathBuf

Path to the source directory, represented with forward slashes. If the directory is inside the top-level source directory then the path is specified relative to that directory (with . for the top-level source directory itself). Otherwise, the path is absolute.

§build: PathBuf

Path to the build directory, represented with forward slashes. If the directory is inside the top-level build directory then the path is specified relative to that directory (with . for the top-level build directory itself). Otherwise, the path is absolute.

§parent_index: Option<usize>

Optional member that is present when the directory is not top-level. The value is an unsigned integer 0-based index of another entry in the main directories array that corresponds to the parent directory that added this directory as a subdirectory.

§child_indexes: Vec<usize>

Optional member that is present when the directory has subdirectories. Each entry corresponding to child directory created by the add_subdirectory() or subdirs() command. Each entry is an unsigned integer 0-based index of another entry in the main directories array.

§project_index: usize

An unsigned integer 0-based index into the main projects array indicating the build system project to which the directory belongs.

§target_indexes: Vec<usize>

Optional member that is present when the directory itself has targets, excluding those belonging to subdirectories. Each entry corresponding to the targets. Each entry is an unsigned integer 0-based index into the main targets array.

§minimum_cmake_version: Option<MinimumCmakeVersion>

Optional member present when a minimum required version of CMake is known for the directory. This is the <min> version given to the most local call to the cmake_minimum_required(VERSION) command in the directory itself or one of its ancestors.

§has_install_rule: bool

True when the directory or one of its subdirectories contains any install() rules, i.e. whether a make install or equivalent rule is available.

§json_file: PathBuf

Path relative to the codemodel file to another JSON file containing a “codemodel” version 2 “directory” object.

Trait Implementations§

source§

impl Clone for DirectoryReference

source§

fn clone(&self) -> DirectoryReference

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DirectoryReference

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for DirectoryReference

source§

fn default() -> DirectoryReference

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for DirectoryReference

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for DirectoryReference

source§

fn eq(&self, other: &DirectoryReference) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for DirectoryReference

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl StructuralPartialEq for DirectoryReference

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,