pub struct GeneratedWorkspace {
pub crates: HashMap<String, GeneratedCrate>,
}Expand description
Result of multi-crate workspace generation.
Contains all generated crates, keyed by crate name.
§Path Convention
All file paths within this structure are crate-relative, not workspace-relative. For example, a workspace with structure:
workspace/
├── Cargo.toml
└── crates/
├── core/
│ └── src/lib.rs
└── app/
└── src/main.rsWould produce:
crates["core"].files["src/lib.rs"]crates["app"].files["src/main.rs"]
The caller is responsible for combining these with crate root paths
to produce workspace-relative paths like "crates/core/src/lib.rs".
Fields§
§crates: HashMap<String, GeneratedCrate>Map of crate_name → GeneratedCrate
Implementations§
Source§impl GeneratedWorkspace
impl GeneratedWorkspace
Sourcepub fn total_files(&self) -> usize
pub fn total_files(&self) -> usize
Get total file count across all crates.
Sourcepub fn iter_files(&self) -> impl Iterator<Item = (&str, &str, &GeneratedFile)>
pub fn iter_files(&self) -> impl Iterator<Item = (&str, &str, &GeneratedFile)>
Iterate all files with full paths.
Trait Implementations§
Source§impl Clone for GeneratedWorkspace
impl Clone for GeneratedWorkspace
Source§fn clone(&self) -> GeneratedWorkspace
fn clone(&self) -> GeneratedWorkspace
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GeneratedWorkspace
impl Debug for GeneratedWorkspace
Source§impl Default for GeneratedWorkspace
impl Default for GeneratedWorkspace
Source§fn default() -> GeneratedWorkspace
fn default() -> GeneratedWorkspace
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GeneratedWorkspace
impl RefUnwindSafe for GeneratedWorkspace
impl Send for GeneratedWorkspace
impl Sync for GeneratedWorkspace
impl Unpin for GeneratedWorkspace
impl UnsafeUnpin for GeneratedWorkspace
impl UnwindSafe for GeneratedWorkspace
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> 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