pub struct MrtrInputResponses { /* private fields */ }Expand description
An ordered, unique, bounded collection of final MRTR input response values.
The vector preserves the exact accepted retry order all the way through
MrtrCompletedInputs. A separate lookup index supports handler key
access without normalizing the handler-visible response sequence into a
sorted map.
Implementations§
Source§impl MrtrInputResponses
impl MrtrInputResponses
Sourcepub fn new(
entries: impl IntoIterator<Item = (String, MrtrInputResponse)>,
) -> McpResult<Self>
pub fn new( entries: impl IntoIterator<Item = (String, MrtrInputResponse)>, ) -> McpResult<Self>
Creates a unique ordered collection of embedded input responses.
§Errors
Returns InvalidParams for an empty or duplicate key, or when more
than HARD_MAX_MRTR_INPUT_REQUESTS_PER_ROUND response values are
given.
Sourcepub fn get(&self, key: &str) -> Option<&MrtrInputResponse>
pub fn get(&self, key: &str) -> Option<&MrtrInputResponse>
Looks up one response by its server-issued input key.
Sourcepub fn iter(&self) -> impl Iterator<Item = (&str, &MrtrInputResponse)>
pub fn iter(&self) -> impl Iterator<Item = (&str, &MrtrInputResponse)>
Iterates over input-response keys and values.
Trait Implementations§
Source§impl Clone for MrtrInputResponses
impl Clone for MrtrInputResponses
Source§fn clone(&self) -> MrtrInputResponses
fn clone(&self) -> MrtrInputResponses
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 MrtrInputResponses
impl Debug for MrtrInputResponses
Source§impl Default for MrtrInputResponses
impl Default for MrtrInputResponses
Source§fn default() -> MrtrInputResponses
fn default() -> MrtrInputResponses
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MrtrInputResponses
impl RefUnwindSafe for MrtrInputResponses
impl Send for MrtrInputResponses
impl Sync for MrtrInputResponses
impl Unpin for MrtrInputResponses
impl UnsafeUnpin for MrtrInputResponses
impl UnwindSafe for MrtrInputResponses
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).