pub enum ParamPosition {
Path,
Query,
Body,
}Expand description
Where a declared parameter’s value lands, for the purposes of the D3 default length cap (Phase 128).
For a single-call HTTP tool this is the SAME answer
tools.rs::build_operation gives as a crate::http::ParameterLocation — both
derive it from path_placeholder_names and method_carries_request_body.
See ToolDecl::param_position for the derivation and for what the previous
divergence between the two cost (CR-02/CR-03).
Variants§
Path
A {name} segment of the tool’s path template. Capped by default: a long
value here has no legitimate use and is where the path-traversal class lives.
Query
A non-path parameter of a tool whose method carries NO request body —
GET, HEAD, DELETE, OPTIONS — so the value travels in the query
string. tools.rs::build_operation gives it
crate::http::ParameterLocation::Query and
crate::http::HttpClient::build_query appends it to the URL.
Capped at [server.validation] default_max_length code points by default,
by default_cap_applies, because an unbounded query value is an unbounded
request line: a 414 on some gateways, a truncation on others, and an
access-log amplification everywhere. If a search tool starts refusing long
queries after upgrading, this is why — declare an explicit max_length on
that parameter to raise the limit.
Body
A POST / PUT / PATCH payload field, a SQL named bind, or a script-tool
argument.
For a single-call HTTP tool this is a genuine JSON payload field:
tools.rs::build_operation gives it
crate::http::ParameterLocation::Body and
crate::http::HttpClient::build_body folds it into the request body. It
reaches no request line, which is why it is NOT capped by default
(D-05 — free text must keep working). Surfaced by ServerConfig::lint and
promotable to an error by [server.validation] strict.
Trait Implementations§
Source§impl Clone for ParamPosition
impl Clone for ParamPosition
impl Copy for ParamPosition
Source§impl Debug for ParamPosition
impl Debug for ParamPosition
impl Eq for ParamPosition
Source§impl Hash for ParamPosition
impl Hash for ParamPosition
Source§impl PartialEq for ParamPosition
impl PartialEq for ParamPosition
impl StructuralPartialEq for ParamPosition
Auto Trait Implementations§
impl Freeze for ParamPosition
impl RefUnwindSafe for ParamPosition
impl Send for ParamPosition
impl Sync for ParamPosition
impl Unpin for ParamPosition
impl UnsafeUnpin for ParamPosition
impl UnwindSafe for ParamPosition
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<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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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