#[non_exhaustive]pub struct PlaceholderRefusal {
pub param: String,
pub rule: &'static str,
pub expected: String,
}Expand description
The D4 path-placeholder floor, re-exported from core pmcp.
There is exactly ONE implementation of these rules and it lives in
pmcp::server::schema_validation. This is a pub use, never a second copy
(Phase 128, Q2). Two reasons the home is core rather than here:
- The toolkit’s curated
httpbuild has nopmcp-code-modeedge and must not gain one (SC-1), so the shared rule cannot live in this crate. - This repo has a documented three-way-drift incident from a security rule that existed in more than one copy, so a second denylist is a prohibited shape rather than a style preference.
The re-export exists because D-09 obliges the SDK to publish the helper under
the name a third-party HttpExecutor implementor would look for. An
implementor whose template syntax is not OpenAPI’s {key} can call
pmcp_code_mode::validate_path_placeholder on each value it substitutes and
pmcp_code_mode::validate_resolved_path on the composed result — or
pmcp_code_mode::validate_resolved_target, which is that rule widened by the
single author-written ? separator, and is what ResolvedPath::from_checked
itself calls. Either reaches the
same rule the SDK itself applies before calling
HttpExecutor::execute_request. (Plain backticks, not an intra-doc link:
executor is gated on js-runtime and the link would not resolve in a
default-feature doc build.)
Why a path-placeholder value was refused.
Carries the DECLARED parameter name and the DECLARED expectation only — never a byte of the rejected value, and never which character tripped the floor (naming the character would itself echo a byte of the value and turn the refusal into a one-byte oracle).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.param: StringThe DECLARED parameter name, safe to echo.
rule: &'static strWhich rule refused: "nonEmpty", "percentEncoding", "characterFloor",
"maxLength", "pattern", "segmentMaxLength" or "pathSegment".
expected: StringThe DECLARED expectation, rendered value-free.
Trait Implementations§
Source§impl Clone for PlaceholderRefusal
impl Clone for PlaceholderRefusal
Source§fn clone(&self) -> PlaceholderRefusal
fn clone(&self) -> PlaceholderRefusal
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 PlaceholderRefusal
impl Debug for PlaceholderRefusal
Source§impl Display for PlaceholderRefusal
impl Display for PlaceholderRefusal
Source§impl Error for PlaceholderRefusal
impl Error for PlaceholderRefusal
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()
Auto Trait Implementations§
impl Freeze for PlaceholderRefusal
impl RefUnwindSafe for PlaceholderRefusal
impl Send for PlaceholderRefusal
impl Sync for PlaceholderRefusal
impl Unpin for PlaceholderRefusal
impl UnsafeUnpin for PlaceholderRefusal
impl UnwindSafe for PlaceholderRefusal
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
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: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more