pub struct ClientTasks {
pub cancel: Option<Map<String, Value>>,
pub list: Option<Map<String, Value>>,
pub requests: Option<ClientTaskRequest>,
}Expand description
Present if the client supports task-augmented requests.
JSON schema
{
"description": "Present if the client supports task-augmented requests.",
"type": "object",
"properties": {
"cancel": {
"description": "Whether this client supports tasks/cancel.",
"type": "object",
"additionalProperties": true
},
"list": {
"description": "Whether this client supports tasks/list.",
"type": "object",
"additionalProperties": true
},
"requests": {
"description": "Specifies which request types can be augmented with tasks.",
"type": "object",
"properties": {
"elicitation": {
"description": "Task support for elicitation-related requests.",
"type": "object",
"properties": {
"create": {
"description": "Whether the client supports task-augmented elicitation/create requests.",
"type": "object",
"additionalProperties": true
}
}
},
"sampling": {
"description": "Task support for sampling-related requests.",
"type": "object",
"properties": {
"createMessage": {
"description": "Whether the client supports task-augmented sampling/createMessage requests.",
"type": "object",
"additionalProperties": true
}
}
}
}
}
}
}Fields§
§cancel: Option<Map<String, Value>>Whether this client supports tasks/cancel.
list: Option<Map<String, Value>>Whether this client supports tasks/list.
requests: Option<ClientTaskRequest>Implementations§
Source§impl ClientTasks
impl ClientTasks
Sourcepub fn can_list_tasks(&self) -> bool
pub fn can_list_tasks(&self) -> bool
Returns true if the server supports listing tasks.
This is determined by whether the list capability is present.
Sourcepub fn can_cancel_tasks(&self) -> bool
pub fn can_cancel_tasks(&self) -> bool
Returns true if the server supports canceling tasks.
This is determined by whether the cancel capability is present.
Sourcepub fn can_accept_elicitation_task(&self) -> bool
pub fn can_accept_elicitation_task(&self) -> bool
Returns true if the client can request elicitation.
Sourcepub fn can_accept_sampling_task(&self) -> bool
pub fn can_accept_sampling_task(&self) -> bool
Returns true if the client can request message sampling.
Trait Implementations§
Source§impl Clone for ClientTasks
impl Clone for ClientTasks
Source§fn clone(&self) -> ClientTasks
fn clone(&self) -> ClientTasks
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 ClientTasks
impl Debug for ClientTasks
Source§impl Default for ClientTasks
impl Default for ClientTasks
Source§fn default() -> ClientTasks
fn default() -> ClientTasks
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ClientTasks
impl<'de> Deserialize<'de> for ClientTasks
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ClientTasks, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ClientTasks, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ClientTasks
impl Serialize for ClientTasks
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 ClientTasks
impl RefUnwindSafe for ClientTasks
impl Send for ClientTasks
impl Sync for ClientTasks
impl Unpin for ClientTasks
impl UnwindSafe for ClientTasks
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