Struct ide::SearchScope
source · pub struct SearchScope { /* private fields */ }
Expand description
Generally, search_scope
returns files that might contain references for the element.
For pub(crate)
things it’s a crate, for pub
things it’s a crate and dependant crates.
In some cases, the location of the references is known to within a TextRange
,
e.g. for things like local variables.
Implementations§
source§impl SearchScope
impl SearchScope
sourcepub fn module_and_children(db: &RootDatabase, module: Module) -> SearchScope
pub fn module_and_children(db: &RootDatabase, module: Module) -> SearchScope
Build a search scope spanning the given module and all its submodules.
sourcepub fn empty() -> SearchScope
pub fn empty() -> SearchScope
Build an empty search scope.
sourcepub fn single_file(file: EditionedFileId) -> SearchScope
pub fn single_file(file: EditionedFileId) -> SearchScope
Build a empty search scope spanning the given file.
sourcepub fn file_range(range: FileRangeWrapper<EditionedFileId>) -> SearchScope
pub fn file_range(range: FileRangeWrapper<EditionedFileId>) -> SearchScope
Build a empty search scope spanning the text range of the given file.
sourcepub fn files(files: &[EditionedFileId]) -> SearchScope
pub fn files(files: &[EditionedFileId]) -> SearchScope
Build a empty search scope spanning the given files.
pub fn intersection(&self, other: &SearchScope) -> SearchScope
Trait Implementations§
source§impl Clone for SearchScope
impl Clone for SearchScope
source§fn clone(&self) -> SearchScope
fn clone(&self) -> SearchScope
Returns a copy 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 moresource§impl Debug for SearchScope
impl Debug for SearchScope
source§impl IntoIterator for SearchScope
impl IntoIterator for SearchScope
source§type Item = (EditionedFileId, Option<TextRange>)
type Item = (EditionedFileId, Option<TextRange>)
The type of the elements being iterated over.
source§type IntoIter = IntoIter<EditionedFileId, Option<TextRange>>
type IntoIter = IntoIter<EditionedFileId, Option<TextRange>>
Which kind of iterator are we turning this into?
source§fn into_iter(self) -> <SearchScope as IntoIterator>::IntoIter
fn into_iter(self) -> <SearchScope as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
Auto Trait Implementations§
impl Freeze for SearchScope
impl RefUnwindSafe for SearchScope
impl Send for SearchScope
impl Sync for SearchScope
impl Unpin for SearchScope
impl UnwindSafe for SearchScope
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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