Struct clang::completion::CompletionString
source · [−]pub struct CompletionString<'r> { /* private fields */ }
Expand description
A semantic string that describes a code completion result.
Implementations
sourceimpl<'r> CompletionString<'r>
impl<'r> CompletionString<'r>
sourcepub fn get_priority(&self) -> usize
pub fn get_priority(&self) -> usize
Returns an integer that represents how likely a user is to select this completion string as determined by internal heuristics. Smaller values indicate higher priorities.
sourcepub fn get_annotations(&self) -> Vec<String>
pub fn get_annotations(&self) -> Vec<String>
Returns the annotations associated with this completion string.
sourcepub fn get_availability(&self) -> Availability
pub fn get_availability(&self) -> Availability
Returns the availability of this completion string.
sourcepub fn get_comment_brief(&self) -> Option<String>
pub fn get_comment_brief(&self) -> Option<String>
Returns the documentation comment brief associated with the declaration this completion string refers to, if applicable.
sourcepub fn get_parent_name(&self) -> Option<String>
pub fn get_parent_name(&self) -> Option<String>
Returns the name of the semantic parent of the declaration this completion string refers to, if applicable.
sourcepub fn get_typed_text(&self) -> Option<String>
pub fn get_typed_text(&self) -> Option<String>
Returns the text of the typed text chunk for this completion string, if any.
sourcepub fn get_chunks(&self) -> Vec<CompletionChunk<'_>>
pub fn get_chunks(&self) -> Vec<CompletionChunk<'_>>
Returns the chunks of this completion string.
Trait Implementations
sourceimpl<'r> Clone for CompletionString<'r>
impl<'r> Clone for CompletionString<'r>
sourcefn clone(&self) -> CompletionString<'r>
fn clone(&self) -> CompletionString<'r>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'r> Debug for CompletionString<'r>
impl<'r> Debug for CompletionString<'r>
sourceimpl<'r> Ord for CompletionString<'r>
impl<'r> Ord for CompletionString<'r>
sourceimpl<'r> PartialEq<CompletionString<'r>> for CompletionString<'r>
impl<'r> PartialEq<CompletionString<'r>> for CompletionString<'r>
sourceimpl<'r> PartialOrd<CompletionString<'r>> for CompletionString<'r>
impl<'r> PartialOrd<CompletionString<'r>> for CompletionString<'r>
sourcefn partial_cmp(&self, other: &CompletionString<'r>) -> Option<Ordering>
fn partial_cmp(&self, other: &CompletionString<'r>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<'r> Copy for CompletionString<'r>
impl<'r> Eq for CompletionString<'r>
Auto Trait Implementations
impl<'r> RefUnwindSafe for CompletionString<'r>
impl<'r> !Send for CompletionString<'r>
impl<'r> !Sync for CompletionString<'r>
impl<'r> Unpin for CompletionString<'r>
impl<'r> UnwindSafe for CompletionString<'r>
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more