pub struct Change {
pub files: Vec<(FileId, Option<Arc<str>>)>,
pub paths: Vec<(FileId, String)>,
pub project_config: Option<Arc<str>>,
}Expand description
A batch of input changes. None text removes the file.
Fields§
§files: Vec<(FileId, Option<Arc<str>>)>Files to add/replace (Some) or remove (None).
paths: Vec<(FileId, String)>Each file’s res:// path (loader-supplied; M3 preload/extends "res://…" resolution).
Supply it when a file is added; it is stable across edits, so a keystroke change must
omit it (salsa bumps an input field’s revision on every set, even an identical value, so
re-sending a path each edit would needlessly invalidate the res_path_registry).
project_config: Option<Arc<str>>The project’s project.godot text (loader-supplied; M4 [autoload] resolution). Set once
on project open / when it changes; omit on .gd keystrokes.
Implementations§
Source§impl Change
impl Change
Sourcepub fn change_file(&mut self, file: FileId, text: impl Into<Arc<str>>)
pub fn change_file(&mut self, file: FileId, text: impl Into<Arc<str>>)
Queue a file add/replace.
Sourcepub fn remove_file(&mut self, file: FileId)
pub fn remove_file(&mut self, file: FileId)
Queue a file removal.
Sourcepub fn set_file_path(&mut self, file: FileId, path: impl Into<String>)
pub fn set_file_path(&mut self, file: FileId, path: impl Into<String>)
Record a file’s res:// path (the project-relative resource path the loader assigns). Set
it once, when the file is first added; omit it on subsequent edits.
Sourcepub fn set_project_config(&mut self, text: impl Into<Arc<str>>)
pub fn set_project_config(&mut self, text: impl Into<Arc<str>>)
Record the project’s project.godot text (M4 [autoload] resolution). Set on project open
/ when it changes; omit on .gd keystrokes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Change
impl RefUnwindSafe for Change
impl Send for Change
impl Sync for Change
impl Unpin for Change
impl UnsafeUnpin for Change
impl UnwindSafe for Change
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
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> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.