Hi,
I have a (for simplicity) &[(String, String)], where first String corresponds to Args::name and the second String corresponds to Args::Value (of type Value::Str). How do I convert this to the Args struct? I can't get around the pub prev: Option<&'a Args<'a>> reference hell in the Args struct.
Edit: It does not need to actually be a function. I'll use the resulting args to format the message immediately, so if there's a way to produce the Args inline, I'd be happy with that as well.
Hi, I have a (for simplicity)
&[(String, String)]
, where first String corresponds toArgs::name
and the second String corresponds toArgs::Value
(of typeValue::Str
). How do I convert this to theArgs
struct? I can't get around thepub prev: Option<&'a Args<'a>>
reference hell in theArgs
struct.That is, I need to implement
Any idea? Thank you.
Edit: It does not need to actually be a function. I'll use the resulting args to format the message immediately, so if there's a way to produce the Args inline, I'd be happy with that as well.