pub struct Files { /* private fields */ }Expand description
The FileId → FileText side table. Arc-backed so a cheap clone shares the same map —
needed to mutate an input (&mut dyn Db) without simultaneously borrowing self.files.
Implementations§
Source§impl Files
impl Files
Sourcepub fn set_file_text(
&self,
db: &mut dyn Db,
file: FileId,
text: &str,
durability: Durability,
)
pub fn set_file_text( &self, db: &mut dyn Db, file: FileId, text: &str, durability: Durability, )
Create or update file’s text input at durability. Creating uses &db; updating an
existing input bumps the revision (&mut db), which is what cancels live read handles.
Sourcepub fn set_file_path(&self, db: &mut dyn Db, file: FileId, path: &str)
pub fn set_file_path(&self, db: &mut dyn Db, file: FileId, path: &str)
Set file’s res:// path at MEDIUM durability (stable project structure, like the
source root). No-op if the file is unknown or the path is unchanged: salsa does not
value-backdate an input setter (it bumps the field revision on every call, even for an
identical value — verified against salsa 0.27.1 input.rs:set_field), so a redundant set
would needlessly invalidate the res_path_registry. The guard keeps a re-apply_change
of an already-known path free.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Files
impl !UnwindSafe for Files
impl Freeze for Files
impl Send for Files
impl Sync for Files
impl Unpin for Files
impl UnsafeUnpin for Files
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.