Struct LocalRoots
pub struct LocalRoots(/* private fields */);Expand description
base_db is normally also needed in places where ide_db is used, so this re-export is for convenience.
The set of “local” (that is, from the current workspace) roots.
Files in local roots are assumed to change frequently.
Implementations§
§impl LocalRoots
impl LocalRoots
pub fn ingredient(db: &(dyn Database + 'static)) -> &IngredientImpl<LocalRoots>
pub fn ingredient_mut( zalsa_mut: &mut Zalsa, ) -> (&mut IngredientImpl<LocalRoots>, &mut Runtime)
§impl LocalRoots
impl LocalRoots
pub fn new<Db_>(
db: &Db_,
roots: HashSet<SourceRootId, FxBuildHasher>,
) -> LocalRootswhere
Db_: Database + ?Sized,
pub fn builder( roots: HashSet<SourceRootId, FxBuildHasher>, ) -> <LocalRoots as HasBuilder>::Builder
pub fn roots<Db_, 'db>(
self,
db: &'db Db_,
) -> &'db HashSet<SourceRootId, FxBuildHasher>where
Db_: Database + ?Sized,
pub fn set_roots<Db_, 'db>(
self,
db: &'db mut Db_,
) -> impl Setter<FieldTy = HashSet<SourceRootId, FxBuildHasher>> + use<'db, Db_>where
Db_: Database + ?Sized,
pub fn try_get<Db_>(db: &Db_) -> Option<LocalRoots>where
Db_: Database + ?Sized,
pub fn get<Db_>(db: &Db_) -> LocalRootswhere
Db_: Database + ?Sized,
pub fn default_debug_fmt(
this: LocalRoots,
f: &mut Formatter<'_>,
) -> Result<(), Error>
pub fn default_debug_fmt( this: LocalRoots, f: &mut Formatter<'_>, ) -> Result<(), Error>
Default debug formatting for this struct (may be useful if you define your own Debug impl)
Trait Implementations§
§impl Clone for LocalRoots
impl Clone for LocalRoots
§fn clone(&self) -> LocalRoots
fn clone(&self) -> LocalRoots
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for LocalRoots
impl Debug for LocalRoots
§impl Hash for LocalRoots
impl Hash for LocalRoots
§impl PartialEq for LocalRoots
impl PartialEq for LocalRoots
§impl Update for LocalRoots
impl Update for LocalRoots
§unsafe fn maybe_update(
old_pointer: *mut LocalRoots,
new_value: LocalRoots,
) -> bool
unsafe fn maybe_update( old_pointer: *mut LocalRoots, new_value: LocalRoots, ) -> bool
Returns Read more
impl Copy for LocalRoots
impl Eq for LocalRoots
impl StructuralPartialEq for LocalRoots
Auto Trait Implementations§
impl Freeze for LocalRoots
impl RefUnwindSafe for LocalRoots
impl Send for LocalRoots
impl Sync for LocalRoots
impl Unpin for LocalRoots
impl UnwindSafe for LocalRoots
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. 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