Struct x_core::XCoreContext[][src]

pub struct XCoreContext { /* fields omitted */ }

Core context shared across all of x.

Implementations

impl XCoreContext[src]

pub fn new(
    project_root: &'static Path,
    current_dir: PathBuf,
    config: XCoreConfig
) -> Result<Self>
[src]

Creates a new XCoreContext.

pub fn project_root(&self) -> &'static Path[src]

Returns the project root for this workspace.

pub fn config(&self) -> &XCoreConfig[src]

Returns the core config.

pub fn current_dir(&self) -> &Path[src]

Returns the current working directory for this process.

pub fn current_rel_dir(&self) -> &Path[src]

Returns the current working directory for this process, relative to the project root.

pub fn current_dir_is_root(&self) -> bool[src]

Returns true if x has been run from the project root.

pub fn git_cli(&self) -> &GitCli[src]

Returns the Git CLI for this workspace.

pub fn package_graph(&self) -> Result<&PackageGraph>[src]

Returns the package graph for this workspace.

pub fn subsets(&self) -> Result<&WorkspaceSubsets<'_>>[src]

Returns information about the subsets for this workspace.

pub fn hakari_builder<'a>(&'a self) -> Result<HakariBuilder<'a, 'static>>[src]

Returns a Hakari builder for this workspace.

pub fn hakari_toml_options(&self) -> TomlOptions[src]

Returns the default Hakari TOML options for this workspace.

Trait Implementations

impl Debug for XCoreContext[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> SafeBorrow<T> for T where
    T: ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.