Struct ra_ap_base_db::Change
source · pub struct Change {
pub roots: Option<Vec<SourceRoot>>,
pub files_changed: Vec<(FileId, Option<Arc<str>>)>,
pub crate_graph: Option<CrateGraph>,
pub proc_macros: Option<ProcMacros>,
}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>§proc_macros: Option<ProcMacros>Implementations§
source§impl Change
impl Change
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 set_proc_macros(&mut self, proc_macros: ProcMacros)
pub fn apply(self, db: &mut dyn SourceDatabaseExt)
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Change
impl Send for Change
impl Sync for Change
impl Unpin for Change
impl UnwindSafe for Change
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