pub struct CompletionParams {
pub context: Option<CompletionContext>,
pub partial_result_token: Option<ProgressToken>,
pub position: Position,
pub text_document: TextDocumentIdentifier,
pub work_done_token: Option<ProgressToken>,
}Fields§
§context: Option<CompletionContext>The completion context. This is only available if the client specifies to send this using
the client capability completion.contextSupport === true
partial_result_token: Option<ProgressToken>An optional token that a server can use to report partial results (e.g. streaming) to the client.
position: PositionThe position inside the text document.
text_document: TextDocumentIdentifierThe text document.
work_done_token: Option<ProgressToken>An optional token that a server can use to report work done progress.
Implementations§
Source§impl CompletionParams
impl CompletionParams
Sourcepub fn ret(
result: OneOf<Vec<CompletionItem>, CompletionList>,
) -> OneOf<Vec<CompletionItem>, CompletionList>
pub fn ret( result: OneOf<Vec<CompletionItem>, CompletionList>, ) -> OneOf<Vec<CompletionItem>, CompletionList>
helper function for user do not need to remember result type of a request
Trait Implementations§
Source§impl Clone for CompletionParams
impl Clone for CompletionParams
Source§fn clone(&self) -> CompletionParams
fn clone(&self) -> CompletionParams
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 Debug for CompletionParams
impl Debug for CompletionParams
Source§impl<'de> Deserialize<'de> for CompletionParams
impl<'de> Deserialize<'de> for CompletionParams
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl FromReq for CompletionParams
impl FromReq for CompletionParams
const METHOD: &'static str = "textDocument/completion"
type Ret = OneOf<Vec<CompletionItem>, CompletionList>
Source§fn from_req(req: RequestMessage) -> OneOf<(ReqId, Self), RequestMessage>
fn from_req(req: RequestMessage) -> OneOf<(ReqId, Self), RequestMessage>
perform message cast from raw request message
if method do not match, return
OneOf::Other(request)Source§fn can_cast(req: &RequestMessage) -> bool
fn can_cast(req: &RequestMessage) -> bool
helper function to test method match or not
Source§impl PartialEq for CompletionParams
impl PartialEq for CompletionParams
Source§impl Serialize for CompletionParams
impl Serialize for CompletionParams
impl StructuralPartialEq for CompletionParams
Auto Trait Implementations§
impl Freeze for CompletionParams
impl RefUnwindSafe for CompletionParams
impl Send for CompletionParams
impl Sync for CompletionParams
impl Unpin for CompletionParams
impl UnwindSafe for CompletionParams
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