pub struct CrateHandle { /* private fields */ }Implementations§
Source§impl CrateHandle
impl CrateHandle
pub fn crate_path(&self) -> &PathBuf
pub fn cargo_toml_handle(&self) -> &Arc<Mutex<CargoToml>>
Source§impl CrateHandle
impl CrateHandle
Sourcepub fn new_sync<P>(crate_path: &P) -> Result<CrateHandle, CrateError>where
P: for<'async_trait> HasCargoTomlPathBuf + for<'async_trait> HasCargoTomlPathBufSync + for<'async_trait> AsRef<Path> + for<'async_trait> Send + for<'async_trait> Sync + 'async_trait,
CrateError: From<<P as HasCargoTomlPathBuf>::Error> + From<<P as HasCargoTomlPathBufSync>::Error>,
pub fn new_sync<P>(crate_path: &P) -> Result<CrateHandle, CrateError>where
P: for<'async_trait> HasCargoTomlPathBuf + for<'async_trait> HasCargoTomlPathBufSync + for<'async_trait> AsRef<Path> + for<'async_trait> Send + for<'async_trait> Sync + 'async_trait,
CrateError: From<<P as HasCargoTomlPathBuf>::Error> + From<<P as HasCargoTomlPathBufSync>::Error>,
Initializes a crate handle from a given crate_path
Source§impl CrateHandle
impl CrateHandle
Sourcepub fn cargo_toml_direct(&self) -> Arc<Mutex<CargoToml>>
pub fn cargo_toml_direct(&self) -> Arc<Mutex<CargoToml>>
sometimes we need to do this, but do try not to
Trait Implementations§
Source§impl ApplyAiReadmeOutput for CrateHandle
impl ApplyAiReadmeOutput for CrateHandle
type Error = CrateError
Source§fn update_readme_md<'life0, 'life1, 'async_trait>(
&'life0 self,
new_contents: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), <CrateHandle as ApplyAiReadmeOutput>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
CrateHandle: 'async_trait,
fn update_readme_md<'life0, 'life1, 'async_trait>(
&'life0 self,
new_contents: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), <CrateHandle as ApplyAiReadmeOutput>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
CrateHandle: 'async_trait,
Source§fn update_cargo_toml<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
new_description: &'life1 str,
new_keywords: &'life2 [String],
new_categories: &'life3 [String],
) -> Pin<Box<dyn Future<Output = Result<(), <CrateHandle as ApplyAiReadmeOutput>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
CrateHandle: 'async_trait,
fn update_cargo_toml<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
new_description: &'life1 str,
new_keywords: &'life2 [String],
new_categories: &'life3 [String],
) -> Pin<Box<dyn Future<Output = Result<(), <CrateHandle as ApplyAiReadmeOutput>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
CrateHandle: 'async_trait,
description, keywords, categories, etc.Source§impl AsRef<Path> for CrateHandle
impl AsRef<Path> for CrateHandle
Source§impl<P> AsyncTryFrom<P> for CrateHandlewhere
P: for<'async_trait> HasCargoTomlPathBuf + for<'async_trait> HasCargoTomlPathBufSync + for<'async_trait> AsRef<Path> + for<'async_trait> Send + for<'async_trait> Sync + 'async_trait,
CrateError: From<<P as HasCargoTomlPathBuf>::Error> + From<<P as HasCargoTomlPathBufSync>::Error>,
impl<P> AsyncTryFrom<P> for CrateHandlewhere
P: for<'async_trait> HasCargoTomlPathBuf + for<'async_trait> HasCargoTomlPathBufSync + for<'async_trait> AsRef<Path> + for<'async_trait> Send + for<'async_trait> Sync + 'async_trait,
CrateError: From<<P as HasCargoTomlPathBuf>::Error> + From<<P as HasCargoTomlPathBufSync>::Error>,
Source§fn new<'life0, 'async_trait>(
crate_path: &'life0 P,
) -> Pin<Box<dyn Future<Output = Result<CrateHandle, <CrateHandle as AsyncTryFrom<P>>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrateHandle: 'async_trait,
fn new<'life0, 'async_trait>(
crate_path: &'life0 P,
) -> Pin<Box<dyn Future<Output = Result<CrateHandle, <CrateHandle as AsyncTryFrom<P>>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrateHandle: 'async_trait,
Initializes a crate handle from a given crate_path
type Error = CrateError
Source§impl CheckIfReadmeExists for CrateHandle
impl CheckIfReadmeExists for CrateHandle
Source§fn check_readme_exists(&self) -> Result<(), CrateError>
fn check_readme_exists(&self) -> Result<(), CrateError>
Checks if README.md exists
Source§impl CheckIfSrcDirectoryContainsValidFiles for CrateHandle
impl CheckIfSrcDirectoryContainsValidFiles for CrateHandle
Source§fn check_src_directory_contains_valid_files(&self) -> Result<(), CrateError>
fn check_src_directory_contains_valid_files(&self) -> Result<(), CrateError>
Checks if the src/ directory contains a lib.rs or main.rs
Source§impl CleanupCrate for CrateHandle
impl CleanupCrate for CrateHandle
fn cleanup_crate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), WorkspaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrateHandle: 'async_trait,
Source§impl Clone for CrateHandle
impl Clone for CrateHandle
Source§fn clone(&self) -> CrateHandle
fn clone(&self) -> CrateHandle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CrateHandle
impl Debug for CrateHandle
Source§impl<'de> Deserialize<'de> for CrateHandle
impl<'de> Deserialize<'de> for CrateHandle
Source§fn deserialize<D>(
deserializer: D,
) -> Result<CrateHandle, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<CrateHandle, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl EnsureAllSourceFilesAreRegistered for CrateHandle
impl EnsureAllSourceFilesAreRegistered for CrateHandle
type Error = SourceFileRegistrationError
fn ensure_all_source_files_are_registered<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), <CrateHandle as EnsureAllSourceFilesAreRegistered>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrateHandle: 'async_trait,
Source§impl EnsureGitClean for CrateHandle
impl EnsureGitClean for CrateHandle
type Error = GitError
fn ensure_git_clean<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), <CrateHandle as EnsureGitClean>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrateHandle: 'async_trait,
Source§impl GatherBinTargetNames for CrateHandle
impl GatherBinTargetNames for CrateHandle
type Error = CrateError
fn gather_bin_target_names<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, <CrateHandle as GatherBinTargetNames>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrateHandle: 'async_trait,
Source§impl GetCargoMetadata for CrateHandle
- For single crates (
CrateHandle), we do a similar approach, but we run
cargo metadata from that crate’s directory (the parent of Cargo.toml),
or pass --manifest-path if you prefer.
impl GetCargoMetadata for CrateHandle
- For single crates (
CrateHandle), we do a similar approach, but we runcargo metadatafrom that crate’s directory (the parent of Cargo.toml), or pass--manifest-pathif you prefer.
type Error = CrateError
fn get_cargo_metadata<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Metadata, <CrateHandle as GetCargoMetadata>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrateHandle: 'async_trait,
Source§impl GetFilesInDirectory for CrateHandle
impl GetFilesInDirectory for CrateHandle
Source§fn get_files_in_dir<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
dir_name: &'life1 str,
extension: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<PathBuf>, CrateError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
CrateHandle: 'async_trait,
fn get_files_in_dir<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
dir_name: &'life1 str,
extension: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<PathBuf>, CrateError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
CrateHandle: 'async_trait,
Asynchronously returns a list of files with the given extension in the specified directory
Source§impl GetFilesInDirectoryWithExclusions for CrateHandle
impl GetFilesInDirectoryWithExclusions for CrateHandle
Source§fn get_files_in_dir_with_exclusions<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
dir_name: &'life1 str,
extension: &'life2 str,
exclude_files: &'life3 [&'life4 str],
) -> Pin<Box<dyn Future<Output = Result<Vec<PathBuf>, CrateError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
CrateHandle: 'async_trait,
fn get_files_in_dir_with_exclusions<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
dir_name: &'life1 str,
extension: &'life2 str,
exclude_files: &'life3 [&'life4 str],
) -> Pin<Box<dyn Future<Output = Result<Vec<PathBuf>, CrateError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
CrateHandle: 'async_trait,
Asynchronously returns a list of files with the given extension in the specified directory, excluding specified file names.
Source§impl GetInternalDependencies for CrateHandle
impl GetInternalDependencies for CrateHandle
Source§fn internal_dependencies<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, CrateError>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrateHandle: 'async_trait,
fn internal_dependencies<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, CrateError>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrateHandle: 'async_trait,
[dependencies] entries that have path = "../some-other-crate".
Returns their names as used in the Cargo.toml [dependencies] table key.Source§impl GetReadmePath for CrateHandle
impl GetReadmePath for CrateHandle
Source§fn readme_path<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<PathBuf>, CrateError>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrateHandle: 'async_trait,
fn readme_path<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<PathBuf>, CrateError>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrateHandle: 'async_trait,
Asynchronously returns the path to the README.md if it exists
Source§impl GetSourceFilesWithExclusions for CrateHandle
impl GetSourceFilesWithExclusions for CrateHandle
Source§fn source_files_excluding<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
exclude_files: &'life1 [&'life2 str],
) -> Pin<Box<dyn Future<Output = Result<Vec<PathBuf>, CrateError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
CrateHandle: 'async_trait,
fn source_files_excluding<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
exclude_files: &'life1 [&'life2 str],
) -> Pin<Box<dyn Future<Output = Result<Vec<PathBuf>, CrateError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
CrateHandle: 'async_trait,
Asynchronously returns a list of source files (.rs) in the src/ directory, excluding specified files
Source§impl GetTestFiles for CrateHandle
impl GetTestFiles for CrateHandle
Source§fn test_files<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<PathBuf>, CrateError>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrateHandle: 'async_trait,
fn test_files<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<PathBuf>, CrateError>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrateHandle: 'async_trait,
Asynchronously returns a list of test files (.rs) in the tests/ directory
Source§impl HasCargoToml for CrateHandle
impl HasCargoToml for CrateHandle
fn cargo_toml( &self, ) -> Arc<Mutex<dyn CargoTomlInterface<Error = CargoTomlError, Error = CargoTomlError, Error = CargoTomlError, Error = CargoTomlError, Error = CargoTomlError, Error = CargoTomlError, Error = CargoTomlError, Error = CargoTomlError, Error = CargoTomlError, Error = CargoTomlError, Error = CargoTomlError, Error = CargoTomlError, Error = CargoTomlError, Error = CargoTomlError, Error = CargoTomlError, Error = CargoTomlError, Error = CargoTomlError, Error = CargoTomlError, Error = CargoTomlError, Error = CargoTomlError, Error = CargoTomlError, Error = CargoTomlError>>>
Source§impl HasTestsDirectory for CrateHandle
impl HasTestsDirectory for CrateHandle
fn has_tests_directory(&self) -> bool
Source§impl IsPrivate for CrateHandle
impl IsPrivate for CrateHandle
Source§fn is_private<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, <CrateHandle as IsPrivate>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrateHandle: 'async_trait,
fn is_private<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, <CrateHandle as IsPrivate>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrateHandle: 'async_trait,
Checks if the crate is private by reading the ‘publish’ field
or ‘publish = false’ or ‘package.publish = false’ in Cargo.toml.
Returns Ok(true) if private, Ok(false) if not private.
type Error = CrateError
Source§impl NameAllFiles for CrateHandle
impl NameAllFiles for CrateHandle
Source§fn name_all_files<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), <CrateHandle as NameAllFiles>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrateHandle: 'async_trait,
fn name_all_files<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), <CrateHandle as NameAllFiles>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrateHandle: 'async_trait,
Removes old marker lines in .rs files of this crate, then inserts one new marker line.
Old markers removed:
-
Lines with 6+ dashes plus
[ File: ... ]e.g.// -------------- [ File: path.rs ] -
Lines that exactly match
// old marker(case-sensitive).
After removal, it prepends:
// ---------------- [ File: relative/path.rs ]
The relative path is path.strip_prefix(self.as_ref()) where possible.
type Error = CrateError
Source§impl Named for CrateHandle
impl Named for CrateHandle
Source§impl PinAllWildcardDependencies for CrateHandle
impl PinAllWildcardDependencies for CrateHandle
type Error = CrateError
fn pin_all_wildcard_dependencies<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), <CrateHandle as PinAllWildcardDependencies>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrateHandle: 'async_trait,
Source§impl PinWildcardDependencies for CrateHandle
impl PinWildcardDependencies for CrateHandle
type Error = CrateError
fn pin_wildcard_dependencies<'life0, 'life1, 'async_trait>(
&'life0 mut self,
lock_versions: &'life1 BTreeMap<String, BTreeSet<Version>>,
) -> Pin<Box<dyn Future<Output = Result<(), CrateError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
CrateHandle: 'async_trait,
Source§impl ReadFileString for CrateHandle
impl ReadFileString for CrateHandle
fn read_file_string<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<String, CrateError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
CrateHandle: 'async_trait,
Source§impl ReadyForCargoPublish for CrateHandle
impl ReadyForCargoPublish for CrateHandle
Source§fn ready_for_cargo_publish<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), <CrateHandle as ReadyForCargoPublish>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrateHandle: 'async_trait,
fn ready_for_cargo_publish<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), <CrateHandle as ReadyForCargoPublish>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrateHandle: 'async_trait,
Checks if the crate is ready for Cargo publishing
type Error = CrateError
Source§impl RebuildOrTest for CrateHandle
impl RebuildOrTest for CrateHandle
Source§fn rebuild_or_test<'life0, 'life1, 'async_trait>(
&'life0 self,
runner: &'life1 dyn CommandRunner,
) -> Pin<Box<dyn Future<Output = Result<(), <CrateHandle as RebuildOrTest>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
CrateHandle: 'async_trait,
fn rebuild_or_test<'life0, 'life1, 'async_trait>(
&'life0 self,
runner: &'life1 dyn CommandRunner,
) -> Pin<Box<dyn Future<Output = Result<(), <CrateHandle as RebuildOrTest>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
CrateHandle: 'async_trait,
Runs cargo build and then cargo test in this crate’s directory.
Logs success or error details; returns Ok(()) if both succeed.
type Error = CrateError
Source§impl RunLinting for CrateHandle
Now do not implement RunLinting in a generic way for all C: CrateHandleInterface.
Instead, implement it for your actual concrete crate type—for example, CrateHandle.
impl RunLinting for CrateHandle
Now do not implement RunLinting in a generic way for all C: CrateHandleInterface.
Instead, implement it for your actual concrete crate type—for example, CrateHandle.
That ensures there is no overlap with Workspace<P,H> in the compiler’s eyes.
type Report = LintReport
type Error = LintingError
fn run_linting<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<<CrateHandle as RunLinting>::Report, <CrateHandle as RunLinting>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrateHandle: 'async_trait,
Source§impl RunTestsWithCoverage for CrateHandle
impl RunTestsWithCoverage for CrateHandle
type Report = TestCoverageReport
type Error = WorkspaceError
fn run_tests_with_coverage<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<<CrateHandle as RunTestsWithCoverage>::Report, <CrateHandle as RunTestsWithCoverage>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrateHandle: 'async_trait,
Source§impl Serialize for CrateHandle
impl Serialize for CrateHandle
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Source§impl SortAndFormatImports for CrateHandle
impl SortAndFormatImports for CrateHandle
type Error = CrateError
Source§fn sort_and_format_imports<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), <CrateHandle as SortAndFormatImports>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrateHandle: 'async_trait,
fn sort_and_format_imports<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), <CrateHandle as SortAndFormatImports>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrateHandle: 'async_trait,
Source§impl TopologicalSortInternalDeps for CrateHandle
impl TopologicalSortInternalDeps for CrateHandle
Source§fn topological_sort_internal_deps<'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,
CrateHandle: 'async_trait,
fn topological_sort_internal_deps<'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,
CrateHandle: 'async_trait,
Source§fn layered_topological_order_upto_self<'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,
CrateHandle: 'async_trait,
fn layered_topological_order_upto_self<'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,
CrateHandle: 'async_trait,
Source§impl TryPublish for CrateHandle
impl TryPublish for CrateHandle
type Error = CrateError
fn try_publish<'life0, 'async_trait>(
&'life0 self,
dry_run: bool,
) -> Pin<Box<dyn Future<Output = Result<(), <CrateHandle as TryPublish>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrateHandle: 'async_trait,
Source§impl UpdateReadmeFiles for CrateHandle
impl UpdateReadmeFiles for CrateHandle
type Error = AiReadmeWriterError
Source§fn update_readme_files<'life0, 'async_trait>(
crate_handle: Arc<Mutex<CrateHandle>>,
plant: bool,
force: bool,
config: &'life0 ReadmeWriterConfig,
) -> Pin<Box<dyn Future<Output = Result<(), <CrateHandle as UpdateReadmeFiles>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrateHandle: 'async_trait,
fn update_readme_files<'life0, 'async_trait>(
crate_handle: Arc<Mutex<CrateHandle>>,
plant: bool,
force: bool,
config: &'life0 ReadmeWriterConfig,
) -> Pin<Box<dyn Future<Output = Result<(), <CrateHandle as UpdateReadmeFiles>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrateHandle: '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 ValidateIntegrity for CrateHandle
impl ValidateIntegrity for CrateHandle
type Error = CrateError
fn validate_integrity<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), <CrateHandle as ValidateIntegrity>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrateHandle: 'async_trait,
Source§impl VerifyCrateIsNotPrivate for CrateHandle
impl VerifyCrateIsNotPrivate for CrateHandle
type Error = CrateError
fn verify_crate_is_not_private<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), <CrateHandle as VerifyCrateIsNotPrivate>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrateHandle: 'async_trait,
Source§impl VerifyCrateVersionIsNotYetPublishedOnCratesIo for CrateHandle
impl VerifyCrateVersionIsNotYetPublishedOnCratesIo for CrateHandle
type Error = CrateError
fn verify_crate_version_is_not_yet_published_on_crates_io<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), <CrateHandle as VerifyCrateVersionIsNotYetPublishedOnCratesIo>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrateHandle: 'async_trait,
Source§impl Versioned for CrateHandle
impl Versioned for CrateHandle
Source§impl WatchAndReload for CrateHandle
impl WatchAndReload for CrateHandle
Source§fn watch_and_reload<'a, 'life0, 'async_trait>(
&'life0 self,
tx: Option<Sender<Result<(), <CrateHandle as WatchAndReload>::Error>>>,
runner: Arc<dyn CommandRunner + Send + Sync + 'a>,
cancel_token: CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<(), <CrateHandle as WatchAndReload>::Error>> + Send + 'async_trait>>where
'a: 'async_trait,
'life0: 'async_trait,
CrateHandle: 'async_trait,
fn watch_and_reload<'a, 'life0, 'async_trait>(
&'life0 self,
tx: Option<Sender<Result<(), <CrateHandle as WatchAndReload>::Error>>>,
runner: Arc<dyn CommandRunner + Send + Sync + 'a>,
cancel_token: CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<(), <CrateHandle as WatchAndReload>::Error>> + Send + 'async_trait>>where
'a: 'async_trait,
'life0: 'async_trait,
CrateHandle: 'async_trait,
Sets up file-watching for this one crate, then enters a watch loop
until cancel_token is triggered. Triggers rebuild/test whenever
a relevant change is detected.
Source§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,
CrateHandle: '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,
CrateHandle: 'async_trait,
A change is considered “relevant” if it’s Cargo.toml or in src/
type Error = CrateError
impl<P> CrateHandleInterface<P> for CrateHandlewhere
P: for<'async_trait> HasCargoTomlPathBuf + for<'async_trait> HasCargoTomlPathBufSync + for<'async_trait> AsRef<Path> + for<'async_trait> Send + for<'async_trait> Sync + 'async_trait,
CrateError: From<<P as HasCargoTomlPathBuf>::Error> + From<<P as HasCargoTomlPathBufSync>::Error>,
Auto Trait Implementations§
impl Freeze for CrateHandle
impl !RefUnwindSafe for CrateHandle
impl Send for CrateHandle
impl Sync for CrateHandle
impl Unpin for CrateHandle
impl !UnwindSafe for CrateHandle
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
Source§impl<T> Bump for Twhere
T: HasCargoToml + HasCargoTomlPathBuf<Error = CrateError> + ValidateIntegrity<Error = CrateError> + AsRef<Path> + Send + Sync,
impl<T> Bump for Twhere
T: HasCargoToml + HasCargoTomlPathBuf<Error = CrateError> + ValidateIntegrity<Error = CrateError> + AsRef<Path> + Send + Sync,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ConsolidateCrateInterface for T
impl<T> ConsolidateCrateInterface for T
fn consolidate_crate_interface<'life0, 'life1, 'async_trait>(
&'life0 self,
options: &'life1 ConsolidationOptions,
) -> Pin<Box<dyn Future<Output = Result<ConsolidatedCrateInterface, CrateError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
Source§impl<T> GetFileSize for T
impl<T> GetFileSize for T
Source§impl<T> GetTargetPathForAIExpansion for Twhere
T: Named,
impl<T> GetTargetPathForAIExpansion for Twhere
T: Named,
fn target_path_for_ai_json_expansion( &self, target_dir: &Path, _expected_content_type: &ExpectedContentType, ) -> PathBuf
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<T> PruneInvalidCategorySlugs for Twhere
T: CrateHandleInterface<PathBuf> + HasCargoToml + AsRef<Path> + Debug + Send + Sync + 'static,
impl<T> PruneInvalidCategorySlugs for Twhere
T: CrateHandleInterface<PathBuf> + HasCargoToml + AsRef<Path> + Debug + Send + Sync + 'static,
type Error = CrateError
fn prune_invalid_category_slugs<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<usize, <T as PruneInvalidCategorySlugs>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
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