Skip to main content

parse_named

Function parse_named 

Source
fn parse_named<T: DeserializeOwned>(
    definition: Value,
    name: &str,
    what: &str,
) -> Result<T, ToolError>
Expand description

Like super::parse_payload, but the name argument wins over (or fills in) any name inside the payload before deserializing — payloads commonly omit name and rely on the tool argument, exactly as the REST PUT /api/...{name} handlers let the path segment override the body.