pub struct CompleteRequest {
pub method: String,
pub params: CompleteParams,
}Expand description
Complete completion/complete request (matches TypeScript CompleteRequest interface)
Fields§
§method: StringMethod name (always “completion/complete”)
params: CompleteParamsRequest parameters
Implementations§
Source§impl CompleteRequest
impl CompleteRequest
pub fn new( reference: CompletionReference, argument: CompleteArgument, ) -> CompleteRequest
pub fn with_context(self, context: CompletionContext) -> CompleteRequest
pub fn with_meta(self, meta: HashMap<String, Value>) -> CompleteRequest
Trait Implementations§
Source§impl Clone for CompleteRequest
impl Clone for CompleteRequest
Source§fn clone(&self) -> CompleteRequest
fn clone(&self) -> CompleteRequest
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 CompleteRequest
impl Debug for CompleteRequest
Source§impl<'de> Deserialize<'de> for CompleteRequest
impl<'de> Deserialize<'de> for CompleteRequest
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CompleteRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CompleteRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl HasCompletionContext for CompleteRequest
impl HasCompletionContext for CompleteRequest
Source§fn argument(&self) -> &CompleteArgument
fn argument(&self) -> &CompleteArgument
The argument being completed
Source§fn context(&self) -> Option<&CompletionContext>
fn context(&self) -> Option<&CompletionContext>
Optional completion context
Source§impl HasCompletionHandling for CompleteRequest
impl HasCompletionHandling for CompleteRequest
Source§fn validate_request(&self, _request: &CompleteRequest) -> Result<(), String>
fn validate_request(&self, _request: &CompleteRequest) -> Result<(), String>
Validate the completion request
Source§impl Serialize for CompleteRequest
impl Serialize for CompleteRequest
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for CompleteRequest
impl RefUnwindSafe for CompleteRequest
impl Send for CompleteRequest
impl Sync for CompleteRequest
impl Unpin for CompleteRequest
impl UnwindSafe for CompleteRequest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CompletionDefinition for T
impl<T> CompletionDefinition for T
Source§fn to_complete_request(&self) -> CompleteRequest
fn to_complete_request(&self) -> CompleteRequest
Convert this completion definition to a protocol CompleteRequest
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.