pub struct ProjectWorkspace { /* private fields */ }Implementations§
Source§impl ProjectWorkspace
impl ProjectWorkspace
Sourcepub fn event_page(
root: impl AsRef<Path>,
after_id: Option<&str>,
limit: usize,
) -> DevelopmentResult<DevelopmentEventPage>
pub fn event_page( root: impl AsRef<Path>, after_id: Option<&str>, limit: usize, ) -> DevelopmentResult<DevelopmentEventPage>
Read the persisted event feed without opening a workspace or recording
a synthetic workspaceOpened event. This keeps monitoring read-only.
pub fn timeline_snapshot( root: impl AsRef<Path>, ) -> DevelopmentResult<Vec<DevelopmentEvent>>
pub fn open(root: impl AsRef<Path>) -> DevelopmentResult<Self>
pub fn root(&self) -> &Path
pub fn detection(&self) -> &ProjectDetection
pub fn config(&self) -> &GlassProjectConfig
pub fn revision(&self) -> u64
pub fn timeline(&self) -> &Timeline
pub fn graph(&self) -> &DevelopmentGraph
pub fn diagnostics(&self) -> &BTreeMap<String, Vec<LanguageDiagnostic>>
pub fn actors(&self) -> impl Iterator<Item = &Actor>
pub fn collaboration(&mut self) -> &mut CollaborationBus
pub fn set_buffer_selection( &mut self, path: &str, selection: Option<TextSelection>, actor: Actor, ) -> DevelopmentResult<EditorBuffer>
Sourcepub fn selected_editor_text(
&self,
path: &str,
) -> DevelopmentResult<Option<String>>
pub fn selected_editor_text( &self, path: &str, ) -> DevelopmentResult<Option<String>>
Return the selected text from a shared buffer, if the selection is non-empty.
Sourcepub fn replace_buffer_selection(
&mut self,
path: &str,
replacement: String,
actor: Actor,
) -> DevelopmentResult<EditorBuffer>
pub fn replace_buffer_selection( &mut self, path: &str, replacement: String, actor: Actor, ) -> DevelopmentResult<EditorBuffer>
Replace the human’s current selection and leave the cursor after the replacement.
pub fn editor_comments(&self, path: Option<&str>) -> Vec<EditorComment>
pub fn add_editor_comment( &mut self, path: &str, start_line: u32, end_line: u32, text: String, actor: Actor, ) -> DevelopmentResult<EditorComment>
pub fn resolve_editor_comment( &mut self, id: &str, actor: Actor, ) -> DevelopmentResult<EditorComment>
pub fn editor_proposals(&self) -> Vec<EditorProposal>
pub fn propose_editor_change( &mut self, path: &str, original: String, proposed: String, summary: String, actor: Actor, ) -> DevelopmentResult<EditorProposal>
pub fn accept_editor_proposal( &mut self, id: &str, actor: Actor, ) -> DevelopmentResult<EditorBuffer>
pub fn accept_pending_editor_proposals( &mut self, actor: Actor, ) -> DevelopmentResult<Vec<EditorBuffer>>
pub fn reject_editor_proposal( &mut self, id: &str, actor: Actor, ) -> DevelopmentResult<EditorProposal>
pub fn editor_checkpoints(&self) -> Vec<EditorCheckpoint>
pub fn create_editor_checkpoint( &mut self, name: String, actor: Actor, ) -> DevelopmentResult<EditorCheckpoint>
pub fn restore_editor_checkpoint( &mut self, id: &str, actor: Actor, ) -> DevelopmentResult<Vec<EditorBuffer>>
pub fn attach_actor(&mut self, actor: Actor) -> DevelopmentResult<()>
pub fn processes(&mut self) -> &mut ProcessManager
pub fn list_files(&self) -> DevelopmentResult<Vec<FileEntry>>
Sourcepub fn list_files_result(&self) -> DevelopmentResult<ProjectTreeResult>
pub fn list_files_result(&self) -> DevelopmentResult<ProjectTreeResult>
Traverse the project with explicit bounds and skip evidence.
pub fn read_file(&mut self, path: &str) -> DevelopmentResult<String>
pub fn open_buffer( &mut self, path: &str, actor: Actor, ) -> DevelopmentResult<EditorBuffer>
pub fn buffers(&self) -> impl Iterator<Item = &EditorBuffer>
pub fn buffer(&self, path: &str) -> Option<&EditorBuffer>
pub fn edit_buffer( &mut self, path: &str, content: String, actor: Actor, ) -> DevelopmentResult<()>
pub fn save_buffer(&mut self, path: &str) -> DevelopmentResult<EditorBuffer>
pub fn undo_buffer(&mut self, path: &str) -> DevelopmentResult<EditorBuffer>
pub fn redo_buffer(&mut self, path: &str) -> DevelopmentResult<EditorBuffer>
pub fn replace_in_buffer( &mut self, path: &str, needle: &str, replacement: &str, actor: Actor, ) -> DevelopmentResult<usize>
pub fn set_buffer_cursor( &mut self, path: &str, line: u32, column: u32, ) -> DevelopmentResult<()>
pub fn rename_path( &mut self, from: &str, to: &str, actor: Actor, ) -> DevelopmentResult<()>
pub fn create_directory( &mut self, path: &str, actor: Actor, ) -> DevelopmentResult<()>
pub fn delete_path(&mut self, path: &str, actor: Actor) -> DevelopmentResult<()>
pub fn write_file( &mut self, path: &str, content: &str, actor: Actor, ) -> DevelopmentResult<()>
pub fn start_process( &mut self, name: &str, command: &str, ) -> DevelopmentResult<ProcessSnapshot>
pub fn stop_process(&mut self, name: &str) -> DevelopmentResult<ProcessSnapshot>
pub fn run_verification( &mut self, name: &str, command: &str, timeout: Duration, ) -> DevelopmentResult<ProcessSnapshot>
pub fn run_command_to_completion( &mut self, name: &str, command: &str, timeout: Duration, ) -> DevelopmentResult<ProcessSnapshot>
Sourcepub fn confirm_live_update(
&mut self,
source_path: &str,
before_revision: u64,
after_revision: u64,
semantic_changes: usize,
actor: Actor,
) -> DevelopmentResult<()>
pub fn confirm_live_update( &mut self, source_path: &str, before_revision: u64, after_revision: u64, semantic_changes: usize, actor: Actor, ) -> DevelopmentResult<()>
Record a live-update proof only after a browser consumer has observed a strictly newer semantic revision. This keeps HMR/build claims tied to caller-supplied browser evidence instead of treating a file save as proof that the running application changed.
pub fn link_runtime_source( &mut self, entity_id: &str, path: &str, start_line: u32, end_line: u32, provenance: LinkProvenance, detail: &str, confidence: f32, actor: Actor, ) -> DevelopmentResult<RuntimeLink>
pub fn diff(&mut self) -> DevelopmentResult<ProjectDiff>
pub fn discover_runtime_links(&mut self) -> DevelopmentResult<Vec<RuntimeLink>>
pub fn publish_rust_diagnostics( &mut self, path: &str, ) -> DevelopmentResult<Vec<LanguageDiagnostic>>
pub fn evaluate_semantic_breakpoints( &mut self, breakpoints: &[SemanticBreakpoint], before: &SemanticSnapshot, after: &SemanticSnapshot, ) -> DevelopmentResult<Vec<SemanticBreakpointHit>>
pub fn replay( &self, start: usize, limit: usize, ) -> DevelopmentResult<ReplayWindow>
pub fn search( &mut self, query: &str, limit: usize, ) -> DevelopmentResult<Vec<SearchHit>>
pub fn record( &mut self, kind: DevelopmentEventKind, payload: Value, ) -> DevelopmentResult<()>
pub fn record_as( &mut self, actor: Actor, kind: DevelopmentEventKind, payload: Value, ) -> DevelopmentResult<()>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ProjectWorkspace
impl !RefUnwindSafe for ProjectWorkspace
impl !Sync for ProjectWorkspace
impl !UnwindSafe for ProjectWorkspace
impl Send for ProjectWorkspace
impl Unpin for ProjectWorkspace
impl UnsafeUnpin for ProjectWorkspace
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&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> 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