Struct ra_ap_ide_completion::CompletionRelevance [−][src]
pub struct CompletionRelevance { pub exact_name_match: bool, pub type_match: Option<CompletionRelevanceTypeMatch>, pub is_local: bool, }
Fields
exact_name_match: bool
This is set in cases like these:
fn f(spam: String) {} fn main { let spam = 92; f($0) // name of local matches the name of param }
type_match: Option<CompletionRelevanceTypeMatch>
See CompletionRelevanceTypeMatch doc comments for cases where this is set.
is_local: bool
This is set in cases like these:
fn foo(a: u32) { let b = 0; $0 // `a` and `b` are local }
Implementations
impl CompletionRelevance
[src]
pub fn score(&self) -> u32
[src]
Provides a relevance score. Higher values are more relevant.
The absolute value of the relevance score is not meaningful, for example a value of 0 doesn’t mean “not relevant”, rather it means “least relevant”. The score value should only be used for relative ordering.
See is_relevant if you need to make some judgement about score in an absolute sense.
pub fn is_relevant(&self) -> bool
[src]
Returns true when the score for this threshold is above some threshold such that we think it is especially likely to be relevant.
Trait Implementations
impl Clone for CompletionRelevance
[src]
fn clone(&self) -> CompletionRelevance
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for CompletionRelevance
[src]
impl Debug for CompletionRelevance
[src]
impl Default for CompletionRelevance
[src]
fn default() -> CompletionRelevance
[src]
impl Eq for CompletionRelevance
[src]
impl PartialEq<CompletionRelevance> for CompletionRelevance
[src]
fn eq(&self, other: &CompletionRelevance) -> bool
[src]
fn ne(&self, other: &CompletionRelevance) -> bool
[src]
impl StructuralEq for CompletionRelevance
[src]
impl StructuralPartialEq for CompletionRelevance
[src]
Auto Trait Implementations
impl RefUnwindSafe for CompletionRelevance
impl Send for CompletionRelevance
impl Sync for CompletionRelevance
impl Unpin for CompletionRelevance
impl UnwindSafe for CompletionRelevance
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Cast for T
pub fn cast<U>(self, interner: &<U as HasInterner>::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
Self: CastTo<U>,
U: HasInterner,
impl<T> CloneAny for T where
T: Any + Clone,
T: Any + Clone,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,