Struct ra_ap_base_db::FileChange
source · pub struct FileChange {
pub roots: Option<Vec<SourceRoot>>,
pub files_changed: Vec<(FileId, Option<Arc<str>>)>,
pub crate_graph: Option<CrateGraph>,
}Expand description
Encapsulate a bunch of raw .set calls on the database.
Fields§
§roots: Option<Vec<SourceRoot>>§files_changed: Vec<(FileId, Option<Arc<str>>)>§crate_graph: Option<CrateGraph>Implementations§
source§impl FileChange
impl FileChange
pub fn new() -> Self
pub fn set_roots(&mut self, roots: Vec<SourceRoot>)
pub fn change_file(&mut self, file_id: FileId, new_text: Option<Arc<str>>)
pub fn set_crate_graph(&mut self, graph: CrateGraph)
pub fn apply(self, db: &mut dyn SourceDatabaseExt)
Trait Implementations§
source§impl Debug for FileChange
impl Debug for FileChange
source§impl Default for FileChange
impl Default for FileChange
source§fn default() -> FileChange
fn default() -> FileChange
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for FileChange
impl Send for FileChange
impl Sync for FileChange
impl Unpin for FileChange
impl UnwindSafe for FileChange
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