pub struct InputRequests(pub BTreeMap<String, InputRequest>);Expand description
Latest MCP Protocol 2026_07_28 A map of server-initiated requests that the client must fulfill. Keys are server-assigned identifiers; values are the request objects.
JSON schema
{
"description": "A map of server-initiated requests that the client must fulfill.\nKeys are server-assigned identifiers; values are the request objects.",
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/InputRequest"
}
}Tuple Fields§
§0: BTreeMap<String, InputRequest>Implementations§
Source§impl InputRequests
impl InputRequests
Sourcepub fn iter(&self) -> impl Iterator<Item = (&String, &InputRequest)>
pub fn iter(&self) -> impl Iterator<Item = (&String, &InputRequest)>
Iterates over the (key, InputRequest) pairs the server is asking the client to resolve.
Sourcepub fn keys(&self) -> impl Iterator<Item = &String>
pub fn keys(&self) -> impl Iterator<Item = &String>
Iterates over the request keys (used to correlate each InputResponse in the retry).
Sourcepub fn get(&self, key: &str) -> Option<&InputRequest>
pub fn get(&self, key: &str) -> Option<&InputRequest>
Returns the InputRequest registered under key, if any.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for InputRequests
impl Clone for InputRequests
Source§fn clone(&self) -> InputRequests
fn clone(&self) -> InputRequests
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 InputRequests
impl Debug for InputRequests
Source§impl<'de> Deserialize<'de> for InputRequests
impl<'de> Deserialize<'de> for InputRequests
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
Auto Trait Implementations§
impl Freeze for InputRequests
impl RefUnwindSafe for InputRequests
impl Send for InputRequests
impl Sync for InputRequests
impl Unpin for InputRequests
impl UnsafeUnpin for InputRequests
impl UnwindSafe for InputRequests
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