pub struct SharedProject(/* private fields */);
Expand description
The shared project allows for many projects to share references to the same
Project
instance.
Implementations§
pub fn with<F, R>(&self, func: F) -> R
pub fn with_mut<F, R>(&self, func: F) -> R
pub fn guard<'g, T, F: Fn(&Project) -> &T + 'g>( &'g self, func: F, ) -> ProjectResult<Guard<'_, T>>
pub fn guard_mut<'g, T, F1, F2>( &'g self, ref_getter: F1, mut_getter: F2, ) -> ProjectResult<GuardMut<'_, T>>
pub fn tasks(&self) -> GuardMut<'_, TaskContainer>
pub fn register_task<T: Task + Send + Sync + Debug + 'static>( &self, id: &str, ) -> ProjectResult<TaskHandle<T>>
Sourcepub fn get_task(&self, id: &TaskId) -> ProjectResult<AnyTaskHandle>
pub fn get_task(&self, id: &TaskId) -> ProjectResult<AnyTaskHandle>
Gets a task with a given name
Sourcepub fn get_typed_task<T: Task + Send + Sync>(
&self,
id: &TaskId,
) -> ProjectResult<TaskHandle<T>>
pub fn get_typed_task<T: Task + Send + Sync>( &self, id: &TaskId, ) -> ProjectResult<TaskHandle<T>>
Gets a typed task
Sourcepub fn find_task<P: AsRef<TaskPath>>(
&self,
path: P,
) -> ProjectResult<AnyTaskHandle>
pub fn find_task<P: AsRef<TaskPath>>( &self, path: P, ) -> ProjectResult<AnyTaskHandle>
Finds a task, using this project as the base task
pub fn get_subproject<P>(&self, project: P) -> Result<SharedProject>
Sourcepub fn allprojects<F: Fn(&Project) + Clone>(&self, callback: F)
pub fn allprojects<F: Fn(&Project) + Clone>(&self, callback: F)
Executes a callback on this project and all sub projects
Sourcepub fn allprojects_mut<F: Fn(&mut Project) + Clone>(&self, callback: F)
pub fn allprojects_mut<F: Fn(&mut Project) + Clone>(&self, callback: F)
Executes a callback on this project and all sub projects
Sourcepub fn task_container(&self) -> Guard<'_, TaskContainer>
pub fn task_container(&self) -> Guard<'_, TaskContainer>
Gets the task container for this project
Sourcepub fn registries<F, R>(&self, func: F) -> Rwhere
F: FnOnce(&mut RegistryContainer) -> R,
pub fn registries<F, R>(&self, func: F) -> Rwhere
F: FnOnce(&mut RegistryContainer) -> R,
Get access to the registries container
Sourcepub fn configurations_mut(&mut self) -> GuardMut<'_, ConfigurationHandler>
pub fn configurations_mut(&mut self) -> GuardMut<'_, ConfigurationHandler>
Get a guard to the dependency container within the project
Sourcepub fn configurations(&self) -> Guard<'_, ConfigurationHandler>
pub fn configurations(&self) -> Guard<'_, ConfigurationHandler>
Get a guard to the dependency container within the project
pub fn workspace(&self) -> Guard<'_, Workspace>
Sourcepub fn apply_plugin<P: Plugin<Project>>(&self) -> ProjectResult
pub fn apply_plugin<P: Plugin<Project>>(&self) -> ProjectResult
Apply a plugin to this.
Trait Implementations§
Source§fn clone(&self) -> SharedProject
fn clone(&self) -> SharedProject
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§fn project<S: AsRef<str>>(&self, path: S) -> ProjectDependency
fn project<S: AsRef<str>>(&self, path: S) -> ProjectDependency
Creates an inter-project dependency with the default configuration
Source§fn project_with<P: AsRef<str>, C: AsRef<str>>(
&self,
path: P,
config: C,
) -> ProjectDependency
fn project_with<P: AsRef<str>, C: AsRef<str>>( &self, path: P, config: C, ) -> ProjectDependency
Creates an inter-project dependency with a given configuration
Auto Trait Implementations§
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> InstanceOf for T
impl<T> InstanceOf for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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