Struct ra_ap_ide_db::famous_defs::FamousDefs
source · [−]pub struct FamousDefs<'a, 'b>(pub &'a Semantics<'b, RootDatabase>, pub Option<Crate>);
Expand description
Helps with finding well-know things inside the standard library. This is somewhat similar to the known paths infra inside hir, but it different; We want to make sure that IDE specific paths don’t become interesting inside the compiler itself as well.
Note that, by default, rust-analyzer tests do not include core or std
libraries. If you are writing tests for functionality using FamousDefs
,
you’d want to include minicore (see test_utils::MiniCore
) declaration at
the start of your tests:
//- minicore: iterator, ord, derive
Tuple Fields
0: &'a Semantics<'b, RootDatabase>
1: Option<Crate>
Implementations
sourceimpl FamousDefs<'_, '_>
impl FamousDefs<'_, '_>
pub fn std(&self) -> Option<Crate>
pub fn core(&self) -> Option<Crate>
pub fn core_cmp_Ord(&self) -> Option<Trait>
pub fn core_convert_From(&self) -> Option<Trait>
pub fn core_convert_Into(&self) -> Option<Trait>
pub fn core_option_Option(&self) -> Option<Enum>
pub fn core_result_Result(&self) -> Option<Enum>
pub fn core_default_Default(&self) -> Option<Trait>
pub fn core_iter_Iterator(&self) -> Option<Trait>
pub fn core_iter_IntoIterator(&self) -> Option<Trait>
pub fn core_iter(&self) -> Option<Module>
pub fn core_ops_Deref(&self) -> Option<Trait>
pub fn core_convert_AsRef(&self) -> Option<Trait>
pub fn core_ops_ControlFlow(&self) -> Option<Enum>
pub fn core_ops_Drop(&self) -> Option<Trait>
pub fn core_marker_Copy(&self) -> Option<Trait>
pub fn core_macros_builtin_derive(&self) -> Option<MacroDef>
pub fn alloc(&self) -> Option<Crate>
pub fn test(&self) -> Option<Crate>
pub fn proc_macro(&self) -> Option<Crate>
pub fn builtin_crates(&self) -> impl Iterator<Item = Crate>
Auto Trait Implementations
impl<'a, 'b> !RefUnwindSafe for FamousDefs<'a, 'b>
impl<'a, 'b> !Send for FamousDefs<'a, 'b>
impl<'a, 'b> !Sync for FamousDefs<'a, 'b>
impl<'a, 'b> Unpin for FamousDefs<'a, 'b> where
'b: 'a,
impl<'a, 'b> !UnwindSafe for FamousDefs<'a, 'b>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn 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
fn cast<U>(self, interner: <U as HasInterner>::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
fn cast<U>(self, interner: <U as HasInterner>::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
Cast a value to type U
using CastTo
.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more