Skip to main content

answered

Function answered 

Source
pub fn answered<I: DeserializeOwned, T: Serialize>(
    op: Op,
    input: Value,
    f: impl FnOnce(I) -> Answer<T>,
) -> Value
Expand description

input read as I (nothing given reads as {}), and f’s answer to it; a codes::WRONG_ARGUMENTS answer of op if it doesn’t read.