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>( &'g self, func: F, ) -> Result<Guard<'g, T>, PayloadError<ProjectError>>
pub fn guard_mut<'g, T, F1, F2>( &'g self, ref_getter: F1, mut_getter: F2, ) -> Result<GuardMut<'g, T>, PayloadError<ProjectError>>
pub fn tasks(&self) -> GuardMut<'_, TaskContainer>
pub fn register_task<T>( &self, id: &str, ) -> Result<TaskHandle<T>, PayloadError<ProjectError>>
Sourcepub fn get_task(
&self,
id: &TaskId,
) -> Result<AnyTaskHandle, PayloadError<ProjectError>>
pub fn get_task( &self, id: &TaskId, ) -> Result<AnyTaskHandle, PayloadError<ProjectError>>
Gets a task with a given name
Sourcepub fn get_typed_task<T>(
&self,
id: &TaskId,
) -> Result<TaskHandle<T>, PayloadError<ProjectError>>
pub fn get_typed_task<T>( &self, id: &TaskId, ) -> Result<TaskHandle<T>, PayloadError<ProjectError>>
Gets a typed task
Sourcepub fn find_task<P>(
&self,
path: P,
) -> Result<AnyTaskHandle, PayloadError<ProjectError>>
pub fn find_task<P>( &self, path: P, ) -> Result<AnyTaskHandle, PayloadError<ProjectError>>
Finds a task, using this project as the base task
pub fn get_subproject<P>( &self, project: P, ) -> Result<SharedProject, PayloadError<ProjectError>>
Sourcepub fn allprojects<F>(&self, callback: F)
pub fn allprojects<F>(&self, callback: F)
Executes a callback on this project and all sub projects
Sourcepub fn allprojects_mut<F>(&self, callback: F)
pub fn allprojects_mut<F>(&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>(&self) -> Result<(), PayloadError<ProjectError>>
pub fn apply_plugin<P>(&self) -> Result<(), PayloadError<ProjectError>>
Apply a plugin to this.
Trait Implementations§
Source§fn clone(&self) -> SharedProject
fn clone(&self) -> SharedProject
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§fn project<S>(&self, path: S) -> ProjectDependency
fn project<S>(&self, path: S) -> ProjectDependency
Creates an inter-project dependency with the default configuration
Source§fn project_with<P, C>(&self, path: P, config: C) -> ProjectDependency
fn project_with<P, C>(&self, path: P, config: C) -> ProjectDependency
Creates an inter-project dependency with a given configuration
Source§fn default() -> SharedProject
fn default() -> SharedProject
Returns the “default value” for a type. Read more
Source§type Error = PayloadError<ProjectError>
type Error = PayloadError<ProjectError>
The type returned in the event of a conversion error.
Source§fn try_from(
value: WeakSharedProject,
) -> Result<SharedProject, <SharedProject as TryFrom<WeakSharedProject>>::Error>
fn try_from( value: WeakSharedProject, ) -> Result<SharedProject, <SharedProject as TryFrom<WeakSharedProject>>::Error>
Performs the conversion.
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