pub enum ModernPostRejection {
EndpointMismatch,
MethodNotAllowed,
TooManyHeaders {
limit: usize,
},
HeaderBlockTooLarge {
limit: usize,
},
DuplicateSingletonHeader {
name: &'static str,
},
UnsupportedMediaType,
UnsupportedContentCoding,
NotAcceptable,
Raw(RawJsonAdmissionError),
InvalidEnvelope,
NotARequest,
FinalAdmission(RequestAdmissionError),
}Expand description
Typed, side-effect-free rejections in deterministic precedence order.
Variants§
EndpointMismatch
The request targeted a different path than the one configured MCP endpoint. The route’s fixed empty-body rejection applies.
MethodNotAllowed
The request used a method other than byte-exact POST.
TooManyHeaders
The request exceeded the header-count ceiling.
HeaderBlockTooLarge
The request exceeded the total header-byte ceiling.
DuplicateSingletonHeader
A singleton request field appeared more than once.
UnsupportedMediaType
The request media type is not application/json (with at most one
charset=utf-8 parameter).
UnsupportedContentCoding
The request content coding is neither absent nor singleton identity.
NotAcceptable
Neither JSON nor SSE is acceptable to the request’s Accept fields.
Raw(RawJsonAdmissionError)
Bounded raw JSON-RPC admission refused the body before parsing, including every top-level array.
InvalidEnvelope
The admitted raw document is not a strict JSON-RPC envelope.
NotARequest
The strict envelope is a response or notification, which this request-admission boundary does not accept.
FinalAdmission(RequestAdmissionError)
Final protocol-version or header/body mirror admission refused the request.
Trait Implementations§
Source§impl Clone for ModernPostRejection
impl Clone for ModernPostRejection
Source§fn clone(&self) -> ModernPostRejection
fn clone(&self) -> ModernPostRejection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ModernPostRejection
impl Debug for ModernPostRejection
Source§impl Display for ModernPostRejection
impl Display for ModernPostRejection
impl Eq for ModernPostRejection
Source§impl Error for ModernPostRejection
impl Error for ModernPostRejection
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for ModernPostRejection
impl PartialEq for ModernPostRejection
impl StructuralPartialEq for ModernPostRejection
Auto Trait Implementations§
impl Freeze for ModernPostRejection
impl RefUnwindSafe for ModernPostRejection
impl Send for ModernPostRejection
impl Sync for ModernPostRejection
impl Unpin for ModernPostRejection
impl UnsafeUnpin for ModernPostRejection
impl UnwindSafe for ModernPostRejection
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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.