pub struct Workspace<P, H>where
H: CrateHandleInterface<P>,
P: for<'async_trait> From<PathBuf> + for<'async_trait> AsRef<Path> + for<'async_trait> Send + for<'async_trait> Sync + 'async_trait,{ /* private fields */ }Implementations§
Trait Implementations§
Source§impl<P, H> AddInternalDependency<P, H> for Workspace<P, H>
impl<P, H> AddInternalDependency<P, H> for Workspace<P, H>
type Error = WorkspaceError
Source§fn add_internal_dependency<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
target_crate: &'life1 H,
dep_crate: &'life2 H,
) -> Pin<Box<dyn Future<Output = Result<(), WorkspaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Workspace<P, H>: 'async_trait,
fn add_internal_dependency<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
target_crate: &'life1 H,
dep_crate: &'life2 H,
) -> Pin<Box<dyn Future<Output = Result<(), WorkspaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Workspace<P, H>: 'async_trait,
Source§impl<P, H> AddToWorkspaceMembers<P> for Workspace<P, H>
impl<P, H> AddToWorkspaceMembers<P> for Workspace<P, H>
Source§impl<P, H> Analyze for Workspace<P, H>where
P: for<'async_trait> From<PathBuf> + for<'async_trait> AsRef<Path> + for<'async_trait> Send + for<'async_trait> Sync + 'async_trait,
H: for<'async_trait> CrateHandleInterface<P> + for<'async_trait> HasTestsDirectory + for<'async_trait> GetTestFiles + for<'async_trait> GetSourceFilesWithExclusions + for<'async_trait> Send + for<'async_trait> Sync + 'async_trait,
Here we implement Analyze for Workspace<P, H>.
Notice that each crate is Arc<Mutex<H>>. Now that we have “passthrough” impls
(see below), Arc<Mutex<H>> will satisfy HasTestsDirectory + GetTestFiles + GetSourceFilesWithExclusions.
impl<P, H> Analyze for Workspace<P, H>where
P: for<'async_trait> From<PathBuf> + for<'async_trait> AsRef<Path> + for<'async_trait> Send + for<'async_trait> Sync + 'async_trait,
H: for<'async_trait> CrateHandleInterface<P> + for<'async_trait> HasTestsDirectory + for<'async_trait> GetTestFiles + for<'async_trait> GetSourceFilesWithExclusions + for<'async_trait> Send + for<'async_trait> Sync + 'async_trait,
Here we implement Analyze for Workspace<P, H>.
Notice that each crate is Arc<Mutex<H>>. Now that we have “passthrough” impls
(see below), Arc<Mutex<H>> will satisfy HasTestsDirectory + GetTestFiles + GetSourceFilesWithExclusions.
type Analysis = WorkspaceSizeAnalysis
type Error = WorkspaceError
fn analyze<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<<Workspace<P, H> as Analyze>::Analysis, <Workspace<P, H> as Analyze>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
Source§impl<P, H> AsyncFindItems for Workspace<P, H>
impl<P, H> AsyncFindItems for Workspace<P, H>
Source§fn find_items<'life0, 'async_trait>(
path: &'life0 Path,
) -> Pin<Box<dyn Future<Output = Result<Vec<<Workspace<P, H> as AsyncFindItems>::Item>, <Workspace<P, H> as AsyncFindItems>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
fn find_items<'life0, 'async_trait>(
path: &'life0 Path,
) -> Pin<Box<dyn Future<Output = Result<Vec<<Workspace<P, H> as AsyncFindItems>::Item>, <Workspace<P, H> as AsyncFindItems>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
Asynchronously finds all the crates in the workspace
type Item = Arc<Mutex<H>>
type Error = WorkspaceError
Source§impl<P, H> AsyncPathValidator for Workspace<P, H>
impl<P, H> AsyncPathValidator for Workspace<P, H>
Source§impl<P, H> AsyncTryFrom<P> for Workspace<P, H>
impl<P, H> AsyncTryFrom<P> for Workspace<P, H>
Source§fn new<'life0, 'async_trait>(
path: &'life0 P,
) -> Pin<Box<dyn Future<Output = Result<Workspace<P, H>, <Workspace<P, H> as AsyncTryFrom<P>>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
fn new<'life0, 'async_trait>(
path: &'life0 P,
) -> Pin<Box<dyn Future<Output = Result<Workspace<P, H>, <Workspace<P, H> as AsyncTryFrom<P>>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
Asynchronously initializes a new workspace at the provided path,
ensuring there’s a [workspace] table in Cargo.toml. If not found,
returns WorkspaceError::ActuallyInSingleCrate.
type Error = WorkspaceError
Source§impl<P, H> BasicTopologicalSort for Workspace<P, H>where
P: for<'a> From<PathBuf> + for<'a> AsRef<Path> + for<'a> Send + for<'a> Sync + 'a,
H: for<'a> CrateHandleInterface<P> + for<'a> Send + for<'a> Sync + 'static,
Workspace<P, H>: GenerateDependencyTree<Tree = Graph<String, ()>, Error = WorkspaceError>,
impl<P, H> BasicTopologicalSort for Workspace<P, H>where
P: for<'a> From<PathBuf> + for<'a> AsRef<Path> + for<'a> Send + for<'a> Sync + 'a,
H: for<'a> CrateHandleInterface<P> + for<'a> Send + for<'a> Sync + 'static,
Workspace<P, H>: GenerateDependencyTree<Tree = Graph<String, ()>, Error = WorkspaceError>,
fn topological_order_crate_names<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 TopologicalSortConfig,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, WorkspaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Workspace<P, H>: 'async_trait,
Source§impl<P, H> BuildWorkspaceSubTree for Workspace<P, H>
impl<P, H> BuildWorkspaceSubTree for Workspace<P, H>
Source§fn build_workspace_subtree<'life0, 'life1, 'async_trait>(
&'life0 self,
crate_name: &'life1 str,
levels: usize,
verbose: bool,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceDependencyTree, WorkspaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Workspace<P, H>: 'async_trait,
fn build_workspace_subtree<'life0, 'life1, 'async_trait>(
&'life0 self,
crate_name: &'life1 str,
levels: usize,
verbose: bool,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceDependencyTree, WorkspaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Workspace<P, H>: 'async_trait,
Builds a tree focusing on a single crate as the “root” (entrypoint),
recursing down its dependencies up to levels.
Source§impl<P, H> BuildWorkspaceTree for Workspace<P, H>
impl<P, H> BuildWorkspaceTree for Workspace<P, H>
Source§fn build_workspace_tree<'life0, 'async_trait>(
&'life0 self,
levels: usize,
verbose: bool,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceDependencyTree, WorkspaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
fn build_workspace_tree<'life0, 'async_trait>(
&'life0 self,
levels: usize,
verbose: bool,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceDependencyTree, WorkspaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
levels levels deep,
optionally toggling “verbose,” or ignoring it as desired.Source§impl<P, T> BumpAll for Workspace<P, T>where
Workspace<P, T>: WorkspaceInterface<P, T> + Send + Sync,
P: for<'any> From<PathBuf> + for<'any> AsRef<Path> + for<'any> Send + for<'any> Sync + for<'any> Clone + 'any,
T: for<'any> CrateHandleInterface<P> + for<'any> Bump<Error = CrateError> + for<'any> Send + for<'any> Sync + for<'any> Clone + 'any,
impl<P, T> BumpAll for Workspace<P, T>where
Workspace<P, T>: WorkspaceInterface<P, T> + Send + Sync,
P: for<'any> From<PathBuf> + for<'any> AsRef<Path> + for<'any> Send + for<'any> Sync + for<'any> Clone + 'any,
T: for<'any> CrateHandleInterface<P> + for<'any> Bump<Error = CrateError> + for<'any> Send + for<'any> Sync + for<'any> Clone + 'any,
type Error = WorkspaceError
Source§fn bump_all<'life0, 'async_trait>(
&'life0 mut self,
release: ReleaseType,
) -> Pin<Box<dyn Future<Output = Result<(), <Workspace<P, T> as BumpAll>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, T>: 'async_trait,
fn bump_all<'life0, 'async_trait>(
&'life0 mut self,
release: ReleaseType,
) -> Pin<Box<dyn Future<Output = Result<(), <Workspace<P, T> as BumpAll>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, T>: 'async_trait,
Source§impl<P, H> BumpCrateAndDownstreams for Workspace<P, H>
impl<P, H> BumpCrateAndDownstreams for Workspace<P, H>
type Error = WorkspaceError
Source§fn bump_crate_and_downstreams<'life0, 'life1, 'async_trait>(
&'life0 mut self,
crate_handle: &'life1 mut CrateHandle,
release: ReleaseType,
) -> Pin<Box<dyn Future<Output = Result<(), <Workspace<P, H> as BumpCrateAndDownstreams>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Workspace<P, H>: 'async_trait,
fn bump_crate_and_downstreams<'life0, 'life1, 'async_trait>(
&'life0 mut self,
crate_handle: &'life1 mut CrateHandle,
release: ReleaseType,
) -> Pin<Box<dyn Future<Output = Result<(), <Workspace<P, H> as BumpCrateAndDownstreams>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Workspace<P, H>: 'async_trait,
Source§impl<P, H> CleanupWorkspace for Workspace<P, H>
impl<P, H> CleanupWorkspace for Workspace<P, H>
Source§impl<P, H> CreateCrateSkeleton<P> for Workspace<P, H>
impl<P, H> CreateCrateSkeleton<P> for Workspace<P, H>
Source§impl<P, H> DetectCircularDependencies for Workspace<P, H>
impl<P, H> DetectCircularDependencies for Workspace<P, H>
Source§fn detect_circular_dependencies<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), WorkspaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
fn detect_circular_dependencies<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), WorkspaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
Detects circular dependencies in the workspace by leveraging cargo metadata.
type Error = WorkspaceError
Source§impl<P, H> EnsureAllSourceFilesAreRegistered for Workspace<P, H>where
P: for<'async_trait> From<PathBuf> + for<'async_trait> AsRef<Path> + for<'async_trait> Clone + for<'async_trait> Send + for<'async_trait> Sync + 'async_trait,
H: CrateHandleInterface<P> + EnsureAllSourceFilesAreRegistered<Error = SourceFileRegistrationError> + Send + Sync,
impl<P, H> EnsureAllSourceFilesAreRegistered for Workspace<P, H>where
P: for<'async_trait> From<PathBuf> + for<'async_trait> AsRef<Path> + for<'async_trait> Clone + for<'async_trait> Send + for<'async_trait> Sync + 'async_trait,
H: CrateHandleInterface<P> + EnsureAllSourceFilesAreRegistered<Error = SourceFileRegistrationError> + Send + Sync,
type Error = SourceFileRegistrationError
fn ensure_all_source_files_are_registered<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), <Workspace<P, H> as EnsureAllSourceFilesAreRegistered>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
Source§impl<P, H> EnsureGitClean for Workspace<P, H>
impl<P, H> EnsureGitClean for Workspace<P, H>
Source§fn ensure_git_clean<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), <Workspace<P, H> as EnsureGitClean>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
fn ensure_git_clean<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), <Workspace<P, H> as EnsureGitClean>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
Checks that the Git working directory is clean:
- If
git status --porcelainreturns any output, we fail. - If there’s no .git folder or
gitisn’t installed, this will also error out.
type Error = GitError
Source§impl<P, H> FindCrateByName<P, H> for Workspace<P, H>
impl<P, H> FindCrateByName<P, H> for Workspace<P, H>
Source§impl<P, H> FocusCrateTopologicalSort for Workspace<P, H>where
P: for<'a> From<PathBuf> + for<'a> AsRef<Path> + for<'a> Send + for<'a> Sync + 'a,
H: for<'a> CrateHandleInterface<P> + for<'a> Send + for<'a> Sync + 'static,
Workspace<P, H>: GenerateDependencyTree<Tree = Graph<String, ()>, Error = WorkspaceError>,
impl<P, H> FocusCrateTopologicalSort for Workspace<P, H>where
P: for<'a> From<PathBuf> + for<'a> AsRef<Path> + for<'a> Send + for<'a> Sync + 'a,
H: for<'a> CrateHandleInterface<P> + for<'a> Send + for<'a> Sync + 'static,
Workspace<P, H>: GenerateDependencyTree<Tree = Graph<String, ()>, Error = WorkspaceError>,
fn topological_order_upto_crate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
config: &'life1 TopologicalSortConfig,
focus_crate_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, WorkspaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Workspace<P, H>: 'async_trait,
fn layered_topological_order_upto_crate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
config: &'life1 TopologicalSortConfig,
focus_crate_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<String>>, WorkspaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Workspace<P, H>: 'async_trait,
Source§impl<P, H> GenerateDependencyTree for Workspace<P, H>
impl<P, H> GenerateDependencyTree for Workspace<P, H>
Source§fn generate_dependency_tree<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Graph<String, ()>, WorkspaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
fn generate_dependency_tree<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Graph<String, ()>, WorkspaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
Generates a dependency tree for all crates in the workspace.
Source§fn generate_dependency_tree_dot<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, WorkspaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
fn generate_dependency_tree_dot<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, WorkspaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
Generates the dependency tree and returns it in DOT format.
type Tree = Graph<String, ()>
type Error = WorkspaceError
Source§impl<P, H> GenerateDocs for Workspace<P, H>
impl<P, H> GenerateDocs for Workspace<P, H>
Source§fn generate_docs<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), WorkspaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
fn generate_docs<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), WorkspaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
Generates the documentation for the entire workspace by running cargo doc.
type Error = WorkspaceError
Source§impl<P, H> GetAllCrateNames for Workspace<P, H>
impl<P, H> GetAllCrateNames for Workspace<P, H>
Source§impl<P, H> GetCargoMetadata for Workspace<P, H>
- Implement
GetCargoMetadata for your Workspace (already done):
impl<P, H> GetCargoMetadata for Workspace<P, H>
- Implement
GetCargoMetadatafor yourWorkspace(already done):
Source§fn get_cargo_metadata<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Metadata, <Workspace<P, H> as GetCargoMetadata>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
fn get_cargo_metadata<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Metadata, <Workspace<P, H> as GetCargoMetadata>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
We run cargo metadata from the workspace root directory
type Error = WorkspaceError
Source§impl<P, H> GetCratesMut<P, H> for Workspace<P, H>
impl<P, H> GetCratesMut<P, H> for Workspace<P, H>
Source§impl<'a, P, H> IntoIterator for &'a Workspace<P, H>
impl<'a, P, H> IntoIterator for &'a Workspace<P, H>
Source§impl<P, H> LayeredTopologicalSort for Workspace<P, H>where
P: for<'a> From<PathBuf> + for<'a> AsRef<Path> + for<'a> Send + for<'a> Sync + 'a,
H: for<'a> CrateHandleInterface<P> + for<'a> Send + for<'a> Sync + 'static,
Workspace<P, H>: GenerateDependencyTree<Tree = Graph<String, ()>, Error = WorkspaceError>,
impl<P, H> LayeredTopologicalSort for Workspace<P, H>where
P: for<'a> From<PathBuf> + for<'a> AsRef<Path> + for<'a> Send + for<'a> Sync + 'a,
H: for<'a> CrateHandleInterface<P> + for<'a> Send + for<'a> Sync + 'static,
Workspace<P, H>: GenerateDependencyTree<Tree = Graph<String, ()>, Error = WorkspaceError>,
fn layered_topological_order_crate_names<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 TopologicalSortConfig,
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<String>>, WorkspaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Workspace<P, H>: 'async_trait,
Source§impl<P, H> NameAllFiles for Workspace<P, H>where
P: for<'async_trait> From<PathBuf> + for<'async_trait> AsRef<Path> + for<'async_trait> Clone + for<'async_trait> Send + for<'async_trait> Sync + 'async_trait,
H: NameAllFiles<Error = CrateError> + CrateHandleInterface<P> + Send + Sync,
impl<P, H> NameAllFiles for Workspace<P, H>where
P: for<'async_trait> From<PathBuf> + for<'async_trait> AsRef<Path> + for<'async_trait> Clone + for<'async_trait> Send + for<'async_trait> Sync + 'async_trait,
H: NameAllFiles<Error = CrateError> + CrateHandleInterface<P> + Send + Sync,
type Error = WorkspaceError
Source§fn name_all_files<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), <Workspace<P, H> as NameAllFiles>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
fn name_all_files<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), <Workspace<P, H> as NameAllFiles>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
// ------ [ File: ... ] lines and prepend a new one
naming each .rs file in either a single crate or an entire workspace.Source§impl<P, H> PinAllWildcardDependencies for Workspace<P, H>where
P: for<'async_trait> From<PathBuf> + for<'async_trait> AsRef<Path> + for<'async_trait> Clone + for<'async_trait> Send + for<'async_trait> Sync + 'async_trait,
H: for<'async_trait> CrateHandleInterface<P, Error = CrateError> + for<'async_trait> PinWildcardDependencies<Error = CrateError> + for<'async_trait> AsyncTryFrom<PathBuf> + for<'async_trait> Send + for<'async_trait> Sync + 'async_trait,
impl<P, H> PinAllWildcardDependencies for Workspace<P, H>where
P: for<'async_trait> From<PathBuf> + for<'async_trait> AsRef<Path> + for<'async_trait> Clone + for<'async_trait> Send + for<'async_trait> Sync + 'async_trait,
H: for<'async_trait> CrateHandleInterface<P, Error = CrateError> + for<'async_trait> PinWildcardDependencies<Error = CrateError> + for<'async_trait> AsyncTryFrom<PathBuf> + for<'async_trait> Send + for<'async_trait> Sync + 'async_trait,
Source§impl<P, H> PruneInvalidCategorySlugsFromSubstructures for Workspace<P, H>where
P: From<PathBuf> + AsRef<Path> + Send + Sync + 'static,
H: CrateHandleInterface<P> + PruneInvalidCategorySlugs<Error = CrateError> + Send + Sync + 'static,
impl<P, H> PruneInvalidCategorySlugsFromSubstructures for Workspace<P, H>where
P: From<PathBuf> + AsRef<Path> + Send + Sync + 'static,
H: CrateHandleInterface<P> + PruneInvalidCategorySlugs<Error = CrateError> + Send + Sync + 'static,
type Error = WorkspaceError
Source§fn prune_invalid_category_slugs_from_members<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<usize, <Workspace<P, H> as PruneInvalidCategorySlugsFromSubstructures>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
fn prune_invalid_category_slugs_from_members<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<usize, <Workspace<P, H> as PruneInvalidCategorySlugsFromSubstructures>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
Source§impl<P, H> ReadyForCargoPublish for Workspace<P, H>where
H: CrateHandleInterface<P> + ReadyForCargoPublish<Error = CrateError>,
P: for<'async_trait> From<PathBuf> + for<'async_trait> AsRef<Path> + for<'async_trait> Send + for<'async_trait> Sync + 'async_trait,
impl<P, H> ReadyForCargoPublish for Workspace<P, H>where
H: CrateHandleInterface<P> + ReadyForCargoPublish<Error = CrateError>,
P: for<'async_trait> From<PathBuf> + for<'async_trait> AsRef<Path> + for<'async_trait> Send + for<'async_trait> Sync + 'async_trait,
Source§fn ready_for_cargo_publish<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), WorkspaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
fn ready_for_cargo_publish<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), WorkspaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
Ensures all crates in the workspace are ready for Cargo publishing
type Error = WorkspaceError
Source§impl<P, H> RebuildOrTest for Workspace<P, H>
impl<P, H> RebuildOrTest for Workspace<P, H>
type Error = WorkspaceError
fn rebuild_or_test<'life0, 'life1, 'async_trait>(
&'life0 self,
runner: &'life1 dyn CommandRunner,
) -> Pin<Box<dyn Future<Output = Result<(), <Workspace<P, H> as RebuildOrTest>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Workspace<P, H>: 'async_trait,
Source§impl<P, H> RegisterInPrefixGroup<P, H> for Workspace<P, H>
impl<P, H> RegisterInPrefixGroup<P, H> for Workspace<P, H>
Source§fn register_in_prefix_crate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
prefix_crate: &'life1 H,
new_crate: &'life2 H,
) -> Pin<Box<dyn Future<Output = Result<(), <Workspace<P, H> as RegisterInPrefixGroup<P, H>>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Workspace<P, H>: 'async_trait,
fn register_in_prefix_crate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
prefix_crate: &'life1 H,
new_crate: &'life2 H,
) -> Pin<Box<dyn Future<Output = Result<(), <Workspace<P, H> as RegisterInPrefixGroup<P, H>>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Workspace<P, H>: 'async_trait,
Registers new_crate into the specified prefix_crate by:
- Adding a path-based dependency in
prefix_crate’s Cargo.toml under[dependencies] new_crate = { path="..." } - Inserting a
pub use new_crate_identifier::*;line inprefix_crate’ssrc/lib.rs(Only if such a line doesn’t already exist).
- “new_crate_identifier” is typically the crate’s name with
-replaced by_, e.g. “batch-mode-batch-schema” => “batch_mode_batch_schema”.
§Steps:
- Compute the relative path from
prefix_cratetonew_cratefor Cargo.toml - Load
prefix_crate’s Cargo.toml viatoml_editand insert dependency - Write updated Cargo.toml
- Append (if not already present) a
pub use <new_crate_identifier>::*;inprefix_crate’ssrc/lib.rs
type Error = WorkspaceError
Source§impl<P, H> RunLinting for Workspace<P, H>
Implementation for the entire workspace.
(unchanged from your original approach).
impl<P, H> RunLinting for Workspace<P, H>
Implementation for the entire workspace. (unchanged from your original approach).
type Report = LintReport
type Error = LintingError
fn run_linting<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<<Workspace<P, H> as RunLinting>::Report, <Workspace<P, H> as RunLinting>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
Source§impl<P, H> RunTestsWithCoverage for Workspace<P, H>
impl<P, H> RunTestsWithCoverage for Workspace<P, H>
Source§fn run_tests_with_coverage<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<<Workspace<P, H> as RunTestsWithCoverage>::Report, <Workspace<P, H> as RunTestsWithCoverage>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
fn run_tests_with_coverage<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<<Workspace<P, H> as RunTestsWithCoverage>::Report, <Workspace<P, H> as RunTestsWithCoverage>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
Runs tests and gathers code coverage.
type Report = TestCoverageReport
type Error = WorkspaceError
Source§impl<P, H> ScanPrefixGroups<P, H> for Workspace<P, H>
impl<P, H> ScanPrefixGroups<P, H> for Workspace<P, H>
Source§fn scan<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<PrefixGroup<P, H>>, <Workspace<P, H> as ScanPrefixGroups<P, H>>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
fn scan<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<PrefixGroup<P, H>>, <Workspace<P, H> as ScanPrefixGroups<P, H>>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
Identifies prefix groups using the “longest facade” logic:
- First, we lock each
Arc<AsyncMutex<H>>to retrieve its name (asString) and store(name, arc_handle)pairs in a local vector. - Sort these pairs by descending name length (so “batch-mode-extra” is processed before “batch-mode”).
- For each pair
(facade_name, facade_arc), if not yet assigned to a group, gather all(other_name, other_arc)whose names matchfacade_nameor start with"facade_name-". - If we get fewer than 2 matches, no group is formed. Otherwise, we form a
PrefixGroupwhoseprefix = facade_name, optionally setprefix_crate = Some(Arc<H>)for the one whose name is exactlyfacade_name, andthree_p_crate = Some(Arc<H>)for the one whose name isfacade_name-3p, with the rest inmember_crates. - We store them as
Arc<H>(notArc<AsyncMutex<H>>) by locking each handle and cloning the innerH. This ensures thePrefixGroupholds a “snapshot” of each crate handle rather than a locked mutex. - Mark all involved crates as assigned. Repeat until all pairs are processed.
type Error = WorkspaceError
Source§impl<P, H> ShowAll for Workspace<P, H>
impl<P, H> ShowAll for Workspace<P, H>
type Error = WorkspaceError
fn show_all<'life0, 'life1, 'async_trait>(
&'life0 self,
options: &'life1 ShowFlags,
) -> Pin<Box<dyn Future<Output = Result<String, <Workspace<P, H> as ShowAll>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Workspace<P, H>: 'async_trait,
Source§impl<P, H> SortAndFormatImports for Workspace<P, H>where
P: for<'async_trait> From<PathBuf> + for<'async_trait> AsRef<Path> + for<'async_trait> Clone + for<'async_trait> Send + for<'async_trait> Sync + 'async_trait,
H: CrateHandleInterface<P> + SortAndFormatImports<Error = CrateError> + Send + Sync,
impl<P, H> SortAndFormatImports for Workspace<P, H>where
P: for<'async_trait> From<PathBuf> + for<'async_trait> AsRef<Path> + for<'async_trait> Clone + for<'async_trait> Send + for<'async_trait> Sync + 'async_trait,
H: CrateHandleInterface<P> + SortAndFormatImports<Error = CrateError> + Send + Sync,
type Error = WorkspaceError
Source§fn sort_and_format_imports<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), <Workspace<P, H> as SortAndFormatImports>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
fn sort_and_format_imports<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), <Workspace<P, H> as SortAndFormatImports>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
Source§impl<P, H> TryPublish for Workspace<P, H>where
P: From<PathBuf> + AsRef<Path> + Send + Sync + 'static,
H: TryPublish<Error = CrateError> + CrateHandleInterface<P> + Send + Sync + 'static,
impl<P, H> TryPublish for Workspace<P, H>where
P: From<PathBuf> + AsRef<Path> + Send + Sync + 'static,
H: TryPublish<Error = CrateError> + CrateHandleInterface<P> + Send + Sync + 'static,
Source§impl<P, H> TryPublishCrateTree<P, H> for Workspace<P, H>where
P: From<PathBuf> + AsRef<Path> + Send + Sync + 'static,
H: TryPublish<Error = CrateError> + CrateHandleInterface<P, Error = CrateError> + IsPrivate + Send + Sync + 'static,
impl<P, H> TryPublishCrateTree<P, H> for Workspace<P, H>where
P: From<PathBuf> + AsRef<Path> + Send + Sync + 'static,
H: TryPublish<Error = CrateError> + CrateHandleInterface<P, Error = CrateError> + IsPrivate + Send + Sync + 'static,
Source§fn try_publish_crate_tree<'life0, 'life1, 'async_trait>(
&'life0 self,
root_crate_name: &'life1 str,
dry_run: bool,
) -> Pin<Box<dyn Future<Output = Result<(), WorkspaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Workspace<P, H>: 'async_trait,
fn try_publish_crate_tree<'life0, 'life1, 'async_trait>(
&'life0 self,
root_crate_name: &'life1 str,
dry_run: bool,
) -> Pin<Box<dyn Future<Output = Result<(), WorkspaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Workspace<P, H>: 'async_trait,
Crates are published in reverse topological order to match the existing
try_publish behaviour.Source§impl<H> UpdateReadmeFiles for Workspace<PathBuf, H>where
H: ReadmeWritingCrateHandle<PathBuf>,
impl<H> UpdateReadmeFiles for Workspace<PathBuf, H>where
H: ReadmeWritingCrateHandle<PathBuf>,
type Error = AiReadmeWriterError
Source§fn update_readme_files<'life0, 'async_trait>(
workspace_arc: Arc<Mutex<Workspace<PathBuf, H>>>,
plant: bool,
force: bool,
config: &'life0 ReadmeWriterConfig,
) -> Pin<Box<dyn Future<Output = Result<(), <Workspace<PathBuf, H> as UpdateReadmeFiles>::Error>> + Send + 'async_trait>>
fn update_readme_files<'life0, 'async_trait>( workspace_arc: Arc<Mutex<Workspace<PathBuf, H>>>, plant: bool, force: bool, config: &'life0 ReadmeWriterConfig, ) -> Pin<Box<dyn Future<Output = Result<(), <Workspace<PathBuf, H> as UpdateReadmeFiles>::Error>> + Send + 'async_trait>>
force parameter means: if false, skip crates/workspaces that already have a README.
The config carries user preferences (docs/fn-bodies/test-items/etc.) for readme generation.Source§impl<P, H> ValidateIntegrity for Workspace<P, H>
impl<P, H> ValidateIntegrity for Workspace<P, H>
Source§impl<P, H> WatchAndReload for Workspace<P, H>where
P: for<'async_trait> From<PathBuf> + for<'async_trait> AsRef<Path> + for<'async_trait> Send + for<'async_trait> Sync + 'async_trait,
H: WatchAndReload<Error = CrateError> + RebuildOrTest<Error = CrateError> + CrateHandleInterface<P> + Send + Sync,
impl<P, H> WatchAndReload for Workspace<P, H>where
P: for<'async_trait> From<PathBuf> + for<'async_trait> AsRef<Path> + for<'async_trait> Send + for<'async_trait> Sync + 'async_trait,
H: WatchAndReload<Error = CrateError> + RebuildOrTest<Error = CrateError> + CrateHandleInterface<P> + Send + Sync,
type Error = WorkspaceError
fn watch_and_reload<'a, 'life0, 'async_trait>(
&'life0 self,
tx: Option<Sender<Result<(), <Workspace<P, H> as WatchAndReload>::Error>>>,
runner: Arc<dyn CommandRunner + Send + Sync + 'a>,
cancel_token: CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<(), <Workspace<P, H> as WatchAndReload>::Error>> + Send + 'async_trait>>where
'a: 'async_trait,
'life0: 'async_trait,
Workspace<P, H>: 'async_trait,
fn is_relevant_change<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Workspace<P, H>: 'async_trait,
Source§impl<P, H> WorkspaceDownstreamExt for Workspace<P, H>
impl<P, H> WorkspaceDownstreamExt for Workspace<P, H>
fn update_downstreams_recursively<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
dep_name: &'life1 str,
new_version: &'life2 Version,
visited: &'life3 mut HashSet<String>,
) -> Pin<Box<dyn Future<Output = Result<(), WorkspaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Workspace<P, H>: 'async_trait,
impl<P, H> WorkspaceInterface<P, H> for Workspace<P, H>
Auto Trait Implementations§
impl<P, H> Freeze for Workspace<P, H>where
P: Freeze,
impl<P, H> !RefUnwindSafe for Workspace<P, H>
impl<P, H> Send for Workspace<P, H>
impl<P, H> Sync for Workspace<P, H>
impl<P, H> Unpin for Workspace<P, H>where
P: Unpin,
impl<P, H> !UnwindSafe for Workspace<P, H>
Blanket Implementations§
Source§impl<P, H, T> AddNewCrateToWorkspace<P, H> for Twhere
P: for<'async_trait> Debug + for<'async_trait> Clone + for<'async_trait> From<PathBuf> + for<'async_trait> AsRef<Path> + for<'async_trait> Send + for<'async_trait> Sync + 'async_trait,
H: CrateHandleInterface<P> + Debug + Send + Sync + Clone,
T: ScanPrefixGroups<P, H, Error = WorkspaceError> + RegisterInPrefixGroup<P, H, Error = WorkspaceError> + CreateCrateSkeleton<P> + AddInternalDependency<P, H, Error = WorkspaceError> + AddToWorkspaceMembers<P> + WorkspaceInterface<P, H> + AsRef<Path> + Sync + Send,
impl<P, H, T> AddNewCrateToWorkspace<P, H> for Twhere
P: for<'async_trait> Debug + for<'async_trait> Clone + for<'async_trait> From<PathBuf> + for<'async_trait> AsRef<Path> + for<'async_trait> Send + for<'async_trait> Sync + 'async_trait,
H: CrateHandleInterface<P> + Debug + Send + Sync + Clone,
T: ScanPrefixGroups<P, H, Error = WorkspaceError> + RegisterInPrefixGroup<P, H, Error = WorkspaceError> + CreateCrateSkeleton<P> + AddInternalDependency<P, H, Error = WorkspaceError> + AddToWorkspaceMembers<P> + WorkspaceInterface<P, H> + AsRef<Path> + Sync + Send,
type Error = WorkspaceError
Source§fn add_new_crate_to_workspace<'life0, 'life1, 'async_trait>(
&'life0 mut self,
new_crate_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<H, <T as AddNewCrateToWorkspace<P, H>>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
fn add_new_crate_to_workspace<'life0, 'life1, 'async_trait>(
&'life0 mut self,
new_crate_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<H, <T as AddNewCrateToWorkspace<P, H>>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
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
Source§impl<T> GetFileSize for T
impl<T> GetFileSize for T
Source§impl<T> GetVersionOfLocalDep for T
impl<T> GetVersionOfLocalDep for T
Source§impl<P> HasCargoTomlPathBuf for P
impl<P> HasCargoTomlPathBuf for P
Source§fn cargo_toml_path_buf<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PathBuf, <P as HasCargoTomlPathBuf>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
P: 'async_trait,
fn cargo_toml_path_buf<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PathBuf, <P as HasCargoTomlPathBuf>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
P: 'async_trait,
Asynchronously returns the path to the Cargo.toml
type Error = CrateError
Source§impl<P> HasCargoTomlPathBufSync for P
impl<P> HasCargoTomlPathBufSync for P
Source§fn cargo_toml_path_buf_sync(
&self,
) -> Result<PathBuf, <P as HasCargoTomlPathBufSync>::Error>
fn cargo_toml_path_buf_sync( &self, ) -> Result<PathBuf, <P as HasCargoTomlPathBufSync>::Error>
Asynchronously returns the path to the Cargo.toml
type Error = CrateError
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> IntoCollection<T> for T
impl<T> IntoCollection<T> for T
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>
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>
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 moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<P> RootDirPathBuf for P
impl<P> RootDirPathBuf for P
Source§fn root_dir_path_buf(&self) -> PathBuf
fn root_dir_path_buf(&self) -> PathBuf
returns the path to the Cargo.toml