pub struct Workspace {
pub metadata: Metadata,
pub crate_dir: CrateDir,
}Expand description
Stores information about the current workspace.
Fields§
§metadata: MetadataMetadata of the workspace, containing detailed information about the packages, dependencies, and other workspace-related data.
crate_dir: CrateDirThe directory containing the manifest file (Cargo.toml) of the workspace.
Implementations§
Source§impl Workspace
impl Workspace
Sourcepub fn packages<'a>(
&'a self,
) -> Map<Iter<'a, Package>, impl Fn(&'a Package) -> WorkspacePackageRef<'a> + Clone>
pub fn packages<'a>( &'a self, ) -> Map<Iter<'a, Package>, impl Fn(&'a Package) -> WorkspacePackageRef<'a> + Clone>
Returns list of all packages
Sourcepub fn workspace_root(&self) -> CrateDir
pub fn workspace_root(&self) -> CrateDir
Sourcepub fn target_directory(&self) -> &Path
pub fn target_directory(&self) -> &Path
Returns the path to target directory
Sourcepub fn package_find_by_manifest<P>(
&self,
manifest_file: P,
) -> Option<WorkspacePackageRef<'_>>
pub fn package_find_by_manifest<P>( &self, manifest_file: P, ) -> Option<WorkspacePackageRef<'_>>
Sourcepub fn packages_which(&self) -> PackagesFilterFormer<'_>
pub fn packages_which(&self) -> PackagesFilterFormer<'_>
Filter of packages.
Trait Implementations§
Source§impl Entries for Workspace
impl Entries for Workspace
Source§fn entries(&self) -> impl IterTrait<'_, SourceFile>
fn entries(&self) -> impl IterTrait<'_, SourceFile>
Returns an iterator over the entries.
Source§impl Sources for Workspace
impl Sources for Workspace
Source§fn sources(&self) -> impl IterTrait<'_, SourceFile>
fn sources(&self) -> impl IterTrait<'_, SourceFile>
Returns an iterator over the source files.
Source§impl TryFrom<CurrentPath> for Workspace
impl TryFrom<CurrentPath> for Workspace
Source§type Error = WorkspaceInitError
type Error = WorkspaceInitError
The type returned in the event of a conversion error.
Source§impl WorkspaceMdExtension for Workspace
impl WorkspaceMdExtension for Workspace
Source§fn discord_url(&self) -> Option<String>
fn discord_url(&self) -> Option<String>
Return discord url
Source§fn master_branch(&self) -> Option<String>
fn master_branch(&self) -> Option<String>
Return the master branch
Source§fn repository_url(&self) -> Option<String>
fn repository_url(&self) -> Option<String>
Return the repository url
Source§fn workspace_name(&self) -> Option<String>
fn workspace_name(&self) -> Option<String>
Return the
workspace_nameAuto Trait Implementations§
impl Freeze for Workspace
impl RefUnwindSafe for Workspace
impl Send for Workspace
impl Sync for Workspace
impl Unpin for Workspace
impl UnwindSafe for Workspace
Blanket Implementations§
Source§impl<S> AssignWithType for S
impl<S> AssignWithType for S
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<C, E> EntryToVal<C> for Ewhere
C: Collection<Entry = E>,
impl<C, E> EntryToVal<C> for Ewhere
C: Collection<Entry = E>,
Source§type Val = <C as Collection>::Val
type Val = <C as Collection>::Val
The type of values stored in the collection. This might be distinct from
Entry in complex collections.
For example, in a HashMap, while Entry might be a ( key, value ) tuple, Val might only be the value part.Source§fn entry_to_val(self) -> <E as EntryToVal<C>>::Val
fn entry_to_val(self) -> <E as EntryToVal<C>>::Val
Converts an entry into a value representation specific to the type of collection. This conversion is crucial
for handling operations on entries, especially when they need to be treated or accessed as individual values,
such as retrieving the value part from a key-value pair in a hash map.
Source§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<Initial, Error, Final> TransitiveTryFrom<Error, Initial> for Final
impl<Initial, Error, Final> TransitiveTryFrom<Error, Initial> for Final
Source§impl<Error, Final, Initial> TransitiveTryInto<Error, Final> for Initial
impl<Error, Final, Initial> TransitiveTryInto<Error, Final> for Initial
Source§impl<C, Val> ValToEntry<C> for Valwhere
C: CollectionValToEntry<Val>,
impl<C, Val> ValToEntry<C> for Valwhere
C: CollectionValToEntry<Val>,
Source§fn val_to_entry(self) -> <C as CollectionValToEntry<Val>>::Entry
fn val_to_entry(self) -> <C as CollectionValToEntry<Val>>::Entry
Invokes the val_to_entry function of the CollectionValToEntry trait to convert the value to an entry.
Source§type Entry = <C as CollectionValToEntry<Val>>::Entry
type Entry = <C as CollectionValToEntry<Val>>::Entry
Represents the type of entry that corresponds to the value within the collection.
Type
Entry is defined by the Collection trait.