pub struct CompletionResult {
pub values: Vec<String>,
pub total: Option<u32>,
pub has_more: Option<bool>,
}
Expand description
Completion result (per MCP spec)
Fields§
§values: Vec<String>
The completion values
total: Option<u32>
Optional total number of possible completions
has_more: Option<bool>
Whether there are more completions available
Implementations§
Source§impl CompletionResult
impl CompletionResult
pub fn new(values: Vec<String>) -> CompletionResult
pub fn with_total(self, total: u32) -> CompletionResult
pub fn with_has_more(self, has_more: bool) -> CompletionResult
Trait Implementations§
Source§impl Clone for CompletionResult
impl Clone for CompletionResult
Source§fn clone(&self) -> CompletionResult
fn clone(&self) -> CompletionResult
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 CompletionResult
impl Debug for CompletionResult
Source§impl<'de> Deserialize<'de> for CompletionResult
impl<'de> Deserialize<'de> for CompletionResult
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CompletionResult, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CompletionResult, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for CompletionResult
impl Serialize for CompletionResult
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 CompletionResult
impl RefUnwindSafe for CompletionResult
impl Send for CompletionResult
impl Sync for CompletionResult
impl Unpin for CompletionResult
impl UnwindSafe for CompletionResult
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