pub struct XCoreContext { /* private fields */ }
Expand description
Core context shared across all of x.
Implementations§
Source§impl XCoreContext
impl XCoreContext
Sourcepub fn new(
project_root: &'static Path,
current_dir: PathBuf,
config: XCoreConfig,
) -> Result<Self>
pub fn new( project_root: &'static Path, current_dir: PathBuf, config: XCoreConfig, ) -> Result<Self>
Creates a new XCoreContext.
Sourcepub fn project_root(&self) -> &'static Path
pub fn project_root(&self) -> &'static Path
Returns the project root for this workspace.
Sourcepub fn config(&self) -> &XCoreConfig
pub fn config(&self) -> &XCoreConfig
Returns the core config.
Sourcepub fn current_dir(&self) -> &Path
pub fn current_dir(&self) -> &Path
Returns the current working directory for this process.
Sourcepub fn current_rel_dir(&self) -> &Path
pub fn current_rel_dir(&self) -> &Path
Returns the current working directory for this process, relative to the project root.
Sourcepub fn current_dir_is_root(&self) -> bool
pub fn current_dir_is_root(&self) -> bool
Returns true if x has been run from the project root.
Sourcepub fn package_graph(&self) -> Result<&PackageGraph>
pub fn package_graph(&self) -> Result<&PackageGraph>
Returns the package graph for this workspace.
Sourcepub fn subsets(&self) -> Result<&WorkspaceSubsets<'_>>
pub fn subsets(&self) -> Result<&WorkspaceSubsets<'_>>
Returns information about the subsets for this workspace.
Sourcepub fn hakari_builder<'a>(&'a self) -> Result<HakariBuilder<'a, 'static>>
pub fn hakari_builder<'a>(&'a self) -> Result<HakariBuilder<'a, 'static>>
Returns a Hakari builder for this workspace.
Sourcepub fn hakari_toml_options(&self) -> TomlOptions
pub fn hakari_toml_options(&self) -> TomlOptions
Returns the default Hakari TOML options for this workspace.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for XCoreContext
impl RefUnwindSafe for XCoreContext
impl Send for XCoreContext
impl Sync for XCoreContext
impl Unpin for XCoreContext
impl UnwindSafe for XCoreContext
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
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more