Skip to main content

ProjectWorkspace

Struct ProjectWorkspace 

Source
pub struct ProjectWorkspace { /* private fields */ }

Implementations§

Source§

impl ProjectWorkspace

Source

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.

Source

pub fn timeline_snapshot( root: impl AsRef<Path>, ) -> DevelopmentResult<Vec<DevelopmentEvent>>

Source

pub fn open(root: impl AsRef<Path>) -> DevelopmentResult<Self>

Source

pub fn root(&self) -> &Path

Source

pub fn detection(&self) -> &ProjectDetection

Source

pub fn config(&self) -> &GlassProjectConfig

Source

pub fn revision(&self) -> u64

Source

pub fn timeline(&self) -> &Timeline

Source

pub fn graph(&self) -> &DevelopmentGraph

Source

pub fn diagnostics(&self) -> &BTreeMap<String, Vec<LanguageDiagnostic>>

Source

pub fn actors(&self) -> impl Iterator<Item = &Actor>

Source

pub fn collaboration(&mut self) -> &mut CollaborationBus

Source

pub fn set_buffer_selection( &mut self, path: &str, selection: Option<TextSelection>, actor: Actor, ) -> DevelopmentResult<EditorBuffer>

Source

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.

Source

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.

Source

pub fn editor_comments(&self, path: Option<&str>) -> Vec<EditorComment>

Source

pub fn add_editor_comment( &mut self, path: &str, start_line: u32, end_line: u32, text: String, actor: Actor, ) -> DevelopmentResult<EditorComment>

Source

pub fn resolve_editor_comment( &mut self, id: &str, actor: Actor, ) -> DevelopmentResult<EditorComment>

Source

pub fn editor_proposals(&self) -> Vec<EditorProposal>

Source

pub fn propose_editor_change( &mut self, path: &str, original: String, proposed: String, summary: String, actor: Actor, ) -> DevelopmentResult<EditorProposal>

Source

pub fn accept_editor_proposal( &mut self, id: &str, actor: Actor, ) -> DevelopmentResult<EditorBuffer>

Source

pub fn accept_pending_editor_proposals( &mut self, actor: Actor, ) -> DevelopmentResult<Vec<EditorBuffer>>

Source

pub fn reject_editor_proposal( &mut self, id: &str, actor: Actor, ) -> DevelopmentResult<EditorProposal>

Source

pub fn editor_checkpoints(&self) -> Vec<EditorCheckpoint>

Source

pub fn create_editor_checkpoint( &mut self, name: String, actor: Actor, ) -> DevelopmentResult<EditorCheckpoint>

Source

pub fn restore_editor_checkpoint( &mut self, id: &str, actor: Actor, ) -> DevelopmentResult<Vec<EditorBuffer>>

Source

pub fn attach_actor(&mut self, actor: Actor) -> DevelopmentResult<()>

Source

pub fn processes(&mut self) -> &mut ProcessManager

Source

pub fn list_files(&self) -> DevelopmentResult<Vec<FileEntry>>

Source

pub fn list_files_result(&self) -> DevelopmentResult<ProjectTreeResult>

Traverse the project with explicit bounds and skip evidence.

Source

pub fn read_file(&mut self, path: &str) -> DevelopmentResult<String>

Source

pub fn open_buffer( &mut self, path: &str, actor: Actor, ) -> DevelopmentResult<EditorBuffer>

Source

pub fn buffers(&self) -> impl Iterator<Item = &EditorBuffer>

Source

pub fn buffer(&self, path: &str) -> Option<&EditorBuffer>

Source

pub fn edit_buffer( &mut self, path: &str, content: String, actor: Actor, ) -> DevelopmentResult<()>

Source

pub fn save_buffer(&mut self, path: &str) -> DevelopmentResult<EditorBuffer>

Source

pub fn undo_buffer(&mut self, path: &str) -> DevelopmentResult<EditorBuffer>

Source

pub fn redo_buffer(&mut self, path: &str) -> DevelopmentResult<EditorBuffer>

Source

pub fn replace_in_buffer( &mut self, path: &str, needle: &str, replacement: &str, actor: Actor, ) -> DevelopmentResult<usize>

Source

pub fn set_buffer_cursor( &mut self, path: &str, line: u32, column: u32, ) -> DevelopmentResult<()>

Source

pub fn rename_path( &mut self, from: &str, to: &str, actor: Actor, ) -> DevelopmentResult<()>

Source

pub fn create_directory( &mut self, path: &str, actor: Actor, ) -> DevelopmentResult<()>

Source

pub fn delete_path(&mut self, path: &str, actor: Actor) -> DevelopmentResult<()>

Source

pub fn write_file( &mut self, path: &str, content: &str, actor: Actor, ) -> DevelopmentResult<()>

Source

pub fn start_process( &mut self, name: &str, command: &str, ) -> DevelopmentResult<ProcessSnapshot>

Source

pub fn stop_process(&mut self, name: &str) -> DevelopmentResult<ProcessSnapshot>

Source

pub fn run_verification( &mut self, name: &str, command: &str, timeout: Duration, ) -> DevelopmentResult<ProcessSnapshot>

Source

pub fn run_command_to_completion( &mut self, name: &str, command: &str, timeout: Duration, ) -> DevelopmentResult<ProcessSnapshot>

Source

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.

Source

pub fn diff(&mut self) -> DevelopmentResult<ProjectDiff>

Source

pub fn publish_rust_diagnostics( &mut self, path: &str, ) -> DevelopmentResult<Vec<LanguageDiagnostic>>

Source

pub fn evaluate_semantic_breakpoints( &mut self, breakpoints: &[SemanticBreakpoint], before: &SemanticSnapshot, after: &SemanticSnapshot, ) -> DevelopmentResult<Vec<SemanticBreakpointHit>>

Source

pub fn replay( &self, start: usize, limit: usize, ) -> DevelopmentResult<ReplayWindow>

Source

pub fn search( &mut self, query: &str, limit: usize, ) -> DevelopmentResult<Vec<SearchHit>>

Source

pub fn record( &mut self, kind: DevelopmentEventKind, payload: Value, ) -> DevelopmentResult<()>

Source

pub fn record_as( &mut self, actor: Actor, kind: DevelopmentEventKind, payload: Value, ) -> DevelopmentResult<()>

Trait Implementations§

Source§

impl Debug for ProjectWorkspace

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast for T
where T: Any,

Source§

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>

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)

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)

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more