pub fn pick_adopted(
explicit: Option<String>,
from_cmdline: Option<String>,
adopted: &[String],
) -> Result<String, &'static str>Expand description
The adopted session an attach belongs to: the session it names, else the one on the provider’s command line when that one is adopted, else the only adopted session. Several adopted sessions and nothing to tell them apart is an error, never a new account.