pub struct FundGuildParams {
pub guild_id: Option<u64>,
pub amount_lh: String,
}Expand description
Args for the browser fund_guild tool (src/app/chat/tools/guild.rs).
Fields§
§guild_id: Option<u64>The id of the guild to fund.
amount_lh: StringAmount of $LH to contribute, as a decimal string (“5”, “1.5”). Pulled from YOUR wallet into the shared treasury. Must be > 0.
Implementations§
Source§impl FundGuildParams
impl FundGuildParams
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 guild_id(&self) -> Result<u64, Error>
pub fn guild_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.