Struct Clang

struct Clang { ... }

A clang executable.

Fields

path: PathBuf

The path to this clang executable.

version: Option<CXVersion>

The version of this clang executable if it could be parsed.

c_search_paths: Option<Vec<PathBuf>>

The directories searched by this clang executable for C headers if they could be parsed.

cpp_search_paths: Option<Vec<PathBuf>>

The directories searched by this clang executable for C++ headers if they could be parsed.

Implementations

impl Clang

fn find(path: Option<&Path>, args: &[String]) -> Option<Clang>

Returns a clang executable if one can be found.

If the CLANG_PATH environment variable is set, that is the instance of clang used. Otherwise, a series of directories are searched. First, if a path is supplied, that is the first directory searched. Then, the directory returned by llvm-config --bindir is searched. On macOS systems, xcodebuild -find clang will next be queried. Last, the directories in the system's PATH are searched.

impl Clone for Clang

fn clone(self: &Self) -> Clang

impl Debug for Clang

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

impl Freeze for Clang

impl RefUnwindSafe for Clang

impl Send for Clang

impl Sync for Clang

impl Unpin for Clang

impl UnsafeUnpin for Clang

impl UnwindSafe for Clang

impl<T> Any for Clang

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for Clang

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for Clang

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

impl<T> CloneToUninit for Clang

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for Clang

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for Clang

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for Clang

fn into(self: Self) -> U

Calls U::from(self).

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

impl<T, U> TryFrom for Clang

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

impl<T, U> TryInto for Clang

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