pub struct ResolveValidationParams {
pub validation_id: Option<u64>,
pub winner: String,
}Expand description
Args for the browser resolve_validation tool
(src/app/chat/tools/validation.rs) — resolver-only ruling.
Fields§
§validation_id: Option<u64>The id of the CHALLENGED validation to resolve.
winner: StringWho wins, paid BOTH stakes: “validator” (the original verdict stands) or “challenger” (the counter-verdict stands).
Implementations§
Source§impl ResolveValidationParams
impl ResolveValidationParams
Sourcepub fn schema() -> Value
pub fn schema() -> Value
Wire input_schema, generated from the SAME table as the struct
fields. Single type per property, no unions / oneOf /
additionalProperties — Gemini-safe by construction.
Sourcepub fn validation_id(&self) -> Result<u64, Error>
pub fn validation_id(&self) -> Result<u64, Error>
Required integer, lenient-extracted: Ok when present and
integer-typed (0 is a REAL value), else the tools’ historical
"<field> is required" error — never a silent default.
Sourcepub fn lenient(args: &Value) -> Self
pub fn lenient(args: &Value) -> Self
Lenient extraction: a missing or wrong-typed field falls back
to its default ("" / None / 0) instead of erroring — the
browser chat tools’ historical .get().and_then().unwrap_or()
semantics, preserved exactly (validation stays in the tool body).
req_u64 fields extract to None here; the error fires at
their generated accessor, matching the old inline ok_or_else.