Struct ide::FileChange
pub struct FileChange {
pub roots: Option<Vec<SourceRoot>>,
pub files_changed: Vec<(FileId, Option<String>)>,
pub crate_graph: Option<CrateGraph>,
pub ws_data: Option<HashMap<Idx<CrateData>, Arc<CrateWorkspaceData>, FxBuildHasher>>,
}
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<CrateGraph>
§ws_data: Option<HashMap<Idx<CrateData>, Arc<CrateWorkspaceData>, FxBuildHasher>>
Implementations§
§impl FileChange
impl FileChange
pub fn new() -> 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: CrateGraph)
pub fn set_ws_data( &mut self, data: HashMap<Idx<CrateData>, Arc<CrateWorkspaceData>, FxBuildHasher>, )
pub fn apply(self, db: &mut dyn SourceRootDatabase)
Trait Implementations§
§impl Debug for FileChange
impl Debug for FileChange
§impl Default for FileChange
impl Default for FileChange
§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> Cast for T
impl<T> Cast for T
§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