pub struct FileChange {
pub roots: Option<Vec<SourceRoot>>,
pub files_changed: Vec<(FileId, Option<String>)>,
pub crate_graph: Option<CrateGraphBuilder>,
}Expand description
Encapsulate a bunch of raw .set calls on the database.
Fields§
§roots: Option<Vec<SourceRoot>>§files_changed: Vec<(FileId, Option<String>)>§crate_graph: Option<CrateGraphBuilder>Implementations§
Source§impl FileChange
impl FileChange
pub fn set_roots(&mut self, roots: Vec<SourceRoot>)
pub fn change_file(&mut self, file_id: FileId, new_text: Option<String>)
pub fn set_crate_graph(&mut self, graph: CrateGraphBuilder)
pub fn apply(self, db: &mut dyn RootQueryDb) -> Option<CratesIdMap>
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 Freeze for FileChange
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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