home ~ projects ~ socials

Return None From A call_method() Function In A Minijinja Object In Rust

pub fn get_page_id(&self, args: &[Value]) -> Result<Value, Error> {
    if args.len() == 1 {
        Ok(Value::from("asdf"))
    } else {
        // TODO: Hoist Error Here
        Ok(Value::from(None::<String>))
    }
}
-- end of line --

References