#[non_exhaustive]pub struct RawComponent {
pub path: Arc<Path>,
pub kind: ComponentKind,
pub raw_blocks: Vec<RawBlock>,
pub diagnostics: Vec<Diagnostic>,
}Expand description
One discovered + parsed component, post-loader.
Carries the flat list of every block in every file (preserving file order and within-file order), plus any non-fatal diagnostics surfaced during parse / lowering.
The downstream phases derive Component, Resource[], ProviderBlock[],
etc. by walking raw_blocks — that projection is Phase 3 work.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.path: Arc<Path>Path of the component dir, relative to the workspace root.
kind: ComponentKindWhether the discoverer classified this as a component or a module.
raw_blocks: Vec<RawBlock>All lowered blocks, file-order then within-file-order.
diagnostics: Vec<Diagnostic>Per-file parse / limit diagnostics. Surfaced upward into
Workspace.diagnostics by the orchestrator.
Implementations§
Source§impl RawComponent
impl RawComponent
Sourcepub fn new(path: Arc<Path>, kind: ComponentKind) -> Self
pub fn new(path: Arc<Path>, kind: ComponentKind) -> Self
Construct an empty RawComponent for path. The loader uses this
as a starting point and pushes blocks / diagnostics during the walk.
Trait Implementations§
Source§impl Clone for RawComponent
impl Clone for RawComponent
Source§fn clone(&self) -> RawComponent
fn clone(&self) -> RawComponent
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 RawComponent
impl Debug for RawComponent
Source§impl PartialEq for RawComponent
impl PartialEq for RawComponent
Source§fn eq(&self, other: &RawComponent) -> bool
fn eq(&self, other: &RawComponent) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RawComponent
Auto Trait Implementations§
impl Freeze for RawComponent
impl RefUnwindSafe for RawComponent
impl Send for RawComponent
impl Sync for RawComponent
impl Unpin for RawComponent
impl UnsafeUnpin for RawComponent
impl UnwindSafe for RawComponent
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