pub struct CompletionString<'r> { /* private fields */ }Expand description
A semantic string that describes a code completion result.
Implementations§
Source§impl<'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§
Source§impl<'r> Clone for CompletionString<'r>
impl<'r> Clone for CompletionString<'r>
Source§fn clone(&self) -> CompletionString<'r>
fn clone(&self) -> CompletionString<'r>
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 moreSource§impl<'r> Debug for CompletionString<'r>
impl<'r> Debug for CompletionString<'r>
Source§impl<'r> Ord for CompletionString<'r>
impl<'r> Ord for CompletionString<'r>
Source§fn cmp(&self, other: &CompletionString<'r>) -> Ordering
fn cmp(&self, other: &CompletionString<'r>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'r> PartialEq for CompletionString<'r>
impl<'r> PartialEq for CompletionString<'r>
Source§impl<'r> PartialOrd for CompletionString<'r>
impl<'r> PartialOrd for CompletionString<'r>
impl<'r> Copy for CompletionString<'r>
impl<'r> Eq for CompletionString<'r>
Auto Trait Implementations§
impl<'r> Freeze for CompletionString<'r>
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§
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