Extracting value from an enum (more thoughts)

Strange, I thought it's trivial in Rust, but I do not see how. I have an enum with about ten cases. I know that I have a particular case and I want to get its value. But I do not see any way doing that except match.

                              match out.get("name") {
                                Some(name) if matches!(name, Text(_)) => match name {
                                    Text(val) => val,
                                    _ => unreachable!(),
                                },
                                _ => "simhttp-${0}"
                            }

Can we close the topic?

match out.get("name") {
    Some(Text(val)) => val,                           
     _ => "simhttp-${0}"
}

Like this?

Or this:

if let Some(Text(val)) = out.get("name") {
   val
} else {
   "simhttp-${0}"
}

Perfect, thanks. I forgot that patterns can be nested.