pub struct Project { /* private fields */ }Implementations§
Source§impl Project
impl Project
pub fn new(root: impl Into<PathBuf>) -> Self
Sourcepub fn plan_init(&self) -> Result<ProjectPlan, ProjectError>
pub fn plan_init(&self) -> Result<ProjectPlan, ProjectError>
Plan a non-destructive project initialization.
§Errors
Returns ProjectError for missing/invalid Cargo metadata or conflicting
generated files.
Sourcepub fn plan_add(
&self,
registry: &BundledRegistry,
requested: &[String],
) -> Result<ProjectPlan, ProjectError>
pub fn plan_add( &self, registry: &BundledRegistry, requested: &[String], ) -> Result<ProjectPlan, ProjectError>
Plan installation of components and transitive dependencies.
§Errors
Returns ProjectError for missing manifests, unknown components,
compatibility failures, or existing untracked source.
Sourcepub fn check(&self) -> Result<CheckReport, ProjectError>
pub fn check(&self) -> Result<CheckReport, ProjectError>
Validate installed baselines, headers, themes, app manifest, imports, and
the required view(ctx) function.
§Errors
Returns ProjectError for any invalid artifact.
Sourcepub fn plan_editor_metadata(&self) -> Result<ProjectPlan, ProjectError>
pub fn plan_editor_metadata(&self) -> Result<ProjectPlan, ProjectError>
Generate schema-driven component metadata and basic editor snippets.
§Errors
Returns manifest, source, compilation, export, or serialization errors.
Sourcepub fn diff(&self) -> Result<Vec<String>, ProjectError>
pub fn diff(&self) -> Result<Vec<String>, ProjectError>
Compare editable files with their committed baselines.
§Errors
Returns ProjectError when project metadata or files cannot be read.
Sourcepub fn plan_update(
&self,
registry: &BundledRegistry,
) -> Result<ProjectPlan, ProjectError>
pub fn plan_update( &self, registry: &BundledRegistry, ) -> Result<ProjectPlan, ProjectError>
Plan safe updates from the bundled registry.
Locally modified files are three-way merged against their install
baseline. Conflicts leave the editable source and baseline untouched and
create an inspectable artifact under .gpui-rhai/conflicts/.
§Errors
Returns I/O, manifest, or path errors. Merge conflicts are recorded on the returned plan and are not silent overwrites.
Sourcepub fn plan_embed(&self) -> Result<ProjectPlan, ProjectError>
pub fn plan_embed(&self) -> Result<ProjectPlan, ProjectError>
Generate a deterministic Rust module for production embedding.
§Errors
Returns ProjectError when manifests or referenced resources cannot
be read.
Sourcepub fn dev(&self) -> Result<(), ProjectError>
pub fn dev(&self) -> Result<(), ProjectError>
Run the Cargo application in the project root.
§Errors
Returns ProjectError when Cargo cannot start or exits unsuccessfully.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Project
impl RefUnwindSafe for Project
impl Send for Project
impl Sync for Project
impl Unpin for Project
impl UnsafeUnpin for Project
impl UnwindSafe for Project
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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> ⓘ
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> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Variant for T
impl<T> Variant for T
Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Variant trait object to &mut dyn Any.Source§fn as_boxed_any(self: Box<T>) -> Box<dyn Any>
fn as_boxed_any(self: Box<T>) -> Box<dyn Any>
Variant trait object to Box<dyn Any>.